Heartburn occurs when stomach acid reflux up into the tube i.e esophagus that carries food from the mouth to the stomach.