Stomach ulcers can be caused by a few things:
helicobacter pylori - these bacteria is thought to be responsible for around 60 per cent of stomach ulcers and at least 90 per cent of duodenal ulcers.
Certain medications - including aspirin, taken regularly to help prevent heart attack or stroke, and drugs for arthritis. Anti-inflammatory medications (nsaids) are thought to cause around two fifths of stomach ulcers.
Cancer - stomach cancer can present as an ulcer, particularly in older people.
A stomach or gastric ulcer is a break in the tissue lining the stomach. The term 'peptic ulcer' refers to those that occur in either the stomach or the first part of the small intestine that leads out of the stomach, called the duodenum.
Treatment for stomach ulcers includes the use of antibiotics to kill the infection, and acid-suppressing drugs.
If you want to know more I got this info from :
http://www.Betterhealth.Vic.Gov.Au/bhcv2/b
hcarticles.Nsf/pages/stomach_ulcer?Opendoc
ument