To better understand heartburn, it helps to understand the anatomy of the esophagus and stomach.
The esophagus is a muscular tube that propels food down to the stomach. It begins in the pharynx, just below the base of the tongue. The esophagus then passes through the chest, next to the spine. It then passes through the diaphragm, before connecting to the stomach.
The esophageal sphincter is a ring of muscle that opens during swallowing, and then closes, in order to prevent food from leaking back into the esophagus after it has entered the stomach.
- Fraser A, Delaney B, Moayyedi P. Symptom-based outcome measures for dyspepsia and GERD trials: a systematic review. Am J Gastroenterol. 2005 Feb;100(2):442-52. 
- Kahrilas PJ. Review article: is stringent control of gastric pH useful and practical in GERD? Aliment Pharmacol Ther. 2004 Oct;20 Suppl 5:89-94.