A peptic ulcer is the term used for a sore that occurs in the mucosal lining of the stomach, small intestine, or esophagus. When the ulcer is in the stomach it might also be called a gastric ulcer.