A peptic ulcer is a lesion on the stomach lining or the first section of the small intestine (duodenum). When the ulcer is in your stomach, it is referred to as a gastric ulcer. If the ulcer is located in your duodenum, it is referred to as a duodenal ulcer.