An ulcer is a sore (open and painful wound). The most common are peptic ulcers which tend to form in the inner lining of the stomach or upper small intestine which is the duodenum and they cause a burning, sharp stomach pain. Stomach ulcers develop when the stomach's digestive juices – which contain an enzyme known as pepsin and hydrochloric acid – irritate and damage tissue.