The pain and burning of heartburn occur when stomach acid comes up from your stomach and into your esophagus. If it happens every day, this can be a serious condition that needs medical care. Heartburn occurs when acids from the stomach irritate the esophagus, the back of the throat. This condition may cause discomfort, reflux, or other symptoms like bad breath or cough. Symptoms may worsen in the evenings, after meals, or when a person is lying down, bending over, or exercising.