Treatment for your stomach ulcer will depend on what caused it. With treatment, most ulcers heal in a few months. Stomach ulcers are usually caused by an infection of Helicobacter pylori (H. pylori) bacteria, or from taking anti-inflammatory medicines (NSAIDs), such as ibuprofen and aspirin.

These can break down the stomach's defence against the acid it produces to digest food, allowing the stomach lining to become damaged and an ulcer to form.