The burning sensation occurs when the stomach contents back up into the esophagus. Food and drink—especially the fatty, greasy, sweet, caffeinated, and acidic kinds—can trigger heartburn.