A peptic ulcer is a sore in the lining of your stomach or your duodenum, the first part of your small intestine. A burning stomach pain is the most common symptom. The pain
Starts between meals or during the night
Briefly stops if you eat or take antacids
Lasts for minutes to hours
Comes and goes for several days or weeks
Peptic ulcers happen when the acids that help you digest food damage the walls of the stomach or duodenum. The most common cause is infection with a bacterium called Helicobacter pylori. Another cause is the long-term use of nonsteroidal anti-inflammatory medicines (NSAIDs) such as aspirin and ibuprofen. Stress and spicy foods do not cause ulcers, but can make them worse.
To see if you have an H. pylori infection, your doctor will test your blood, breath, or stool. Your doctor also may look inside your stomach and duodenum by doing an endoscopy or x-ray.
Peptic ulcers will get worse if not treated. Treatment may include medicines to reduce stomach acids or antibiotics to kill H. pylori. Antacids and milk can't heal peptic ulcers. Not smoking and avoiding alcohol can help. You may need surgery if your ulcers don't heal.
NIH: National Institute of Diabetes and Digestive and Kidney Diseases