When you chew and swallow food there is an esophageal sphincter that allows the food from the food pipe to enter your stomach. When the food enters your stomach, to digest the food, the stomach releases lots of digestive acid. Sometimes when the sphincter doesn’t close on time or when it is malfunctioning, or when too much acid is being generated for it to contain, the acid reaches your food pipe. This gives you acidity or heartburn.