Peptic ulcers occur when acid in the digestive tract eats away at the inner surface of the stomach or small intestine. The acid can create a painful open sore that may bleed. Your digestive tract is coated with a mucous layer that normally protects against acid.