Many ulcers can be treated with certain kinds of anitbiotics now. Apparently they used to think they were all caused by stress and acid and certain foods. Now they know that a lot of them are a kind of infection that is irritated by these other things. So they give you some kind of stomach-coating medicine, like Pepto, to sooth the stomach and protect it, and they give you antibiotics to fight the infection.