Heartburn is so called because your esophagus runs right past your heart (to the midline of course), and that’s where the pain is. It’s a burning sensation and tends to be worse at night (when you’re lying down). It has a sour or bitter taste, sometimes a sore throat and a chronic cough, and occasionally it can be associated with asthma.
Usually it can be diagnosed from clinical history, but there are a few other diagnostic measures – imaging mostly – which can potentially determine whether there is a structural cause (such as a narrow stomach opening – called pyloric stenosis – or stomach protrusion through the diaphragm – called a hiatal hernia). But once structural causes are ruled out, other accepted causes include spicy or acidic foods (such as coffee, tea, orange juice or citrus in general, milk, alcohol, or nicotine), high stomach acid, or anything that might cause upward pressure, such as pregnancy or plain old extra weight.
Naturopathic docs will add a few more causes to that list. Notably these causes include food allergies, imbalance of gut flora, and even too little stomach acid (hypochlorhydria).
The opening between the esophagus and the stomach (lower esophageal sphincter) is pH sensitive, and the acidity of the stomach causes it to close. Too little stomach acid can prevent the sphincter from closing, which means it’s wide open so that the acid that is present in the stomach is free to splash back up into the esophagus – causing heartburn. So while acid blockers may improve the symptom (less acid left to enter the esophagus in the first place), if this is the cause it won’t deal with the problem, and may even make it worse.