A peptic ulcer is a term used to describe an irritation or sore in the lining of the stomach (a gastric ulcer) or in the upper part of the small intestine, the duodenum (a duodenal ulcer). Left untreated, an ulcer can be a very serious problem.