Food is digested in stomach with the help of Hydrochloric Acid (HCl) secreted in stomach.
The proportion of protein is more in food like fish, meat, eggs, etc.
When such food enters the stomach, more HCl (of pH 1 to 3) is secreted in stomach. Now stomach has a mucus lining which protects itself from its own secretion of HCl, but oesophagus doesn't. Due to oversecretion of HCl, sometimes it touches the lower end of oesophagus due to which there is irritation in the stomach region. It is called acidity.
Basic substances are taken for the remedy of acidity, which are known as antacids.
Some commonly used antacids are:
Sodium Hydrogen Carbonate- Baking Soda- NaHCO₃'
Magnesium Hydroxide-Milk of Magnesia- Mg(OH)₂
Aluminium Hydroxide- Al(OH)₃
These antacids neutralize the excess acid in the stomach and thus we get relief from acidity.
Ammonia - NH₃ is actually a basic natured substance. When it dissolves in water it forms Ammonium Hydroxide-NH₄OH. This NH₄OH ionizes in water to form NH₄⁺ and OH⁻ ions. The OH⁻ ions are responsible for the basic nature of alkaline solutions.
So, Ammonia in aqueous state turns red litmus paper into blue as it is basic in nature.