What Causes Heartburn? Heartburn typically occurs when contents from the stomach back up into the esophagus. The esophagus is a tube that carries food and fluids from the mouth into the stomach. Your esophagus connects to your stomach at a juncture known as the cardiac or lower esophageal sphincter.