A stomach ulcer is a sore that develops on the lining of the stomach, typically caused by infection with bacteria or prolonged use of certain medications. It causes pain, burning, and may lead to complications like bleeding if left untreated.