A stomach ulcer
-- medically known as peptic ulcer disease -- is a relatively common problem. That being said there are many other causes of stomach pain. I would recommend that you discuss this with your primary care doctor
Peptic ulcer disease occurs when the lining of the stomach (or the duodenum -- the first part of the small intestine) develops an errosion. Often this is caused by excess action of stomach acid -- although often other irritants can contribute (notably alcohol can be a major irritant, as can pain killing medications. A bacteria known as H Pylori is also a major irritant.). When there is an erosion in the lining -- the symptoms that occur are often severe abdominal pain
-- often at the top half and middle of the stomach. Other common symptoms are nausea and blood in the stool or blood in the vomit.
A doctor can help you with this. History, examination, checking the stool for blood and other tests of the blood (specifically looking for a bacteria that causes ulcers) can help. Ultimately however, the only true way to diagnose this is to do an endoscopy -- that is placing a small camera into the stomach to visually inspect it.
Your doctor can help treat this with medications. Talk to your doctor for more information.