The human intestinal tract is in a form of a tube with muscles in the wall which moves the food along. At the bottom of the oesophagus (gullet) is a muscles encircling the tube which works likes a valve to stop the food we have eaten from going backwards. In many instances this is the not the same for everyone. Heartburn then develops when small amounts of this acid rise up into the oesophagus. This is called reflux.
The weakness of the valve between to osophagus and the stomach could be happen to:
People who are obese can leads to a higher pressure in the abdomen.
Pregnancy can cause high pressure in the abdomen and there is also evidence that the changing hormone levels cause relaxation of the muscle valve.
Excessive amount of eating or drinking cause back pressure.
In hiatus hernia, which is quite a common condition, the top part of the stomach pokes through the muscle which separates the chest from the abdomen (the diaphragm), and results in disruption of the valve mechanism.
Smoking can also causes the valve to relax and also increases acid production.
For most people with heartburn it is only a mild conditions and minimal damage is done to the oesophagus. Like any illness if early treatments is not done it could become worse.