Hydrochloric acid produced in our stomach helps the digestion of food without causing any harm to the stomach. But when the amount of the acid goes beyond a certain limit due to indigestion, pain and irritation are created in the stomach. So, in order to neutralize the effect of excess acid, a mild base called antacid is usually taken. Magnesium hydroxide (milk of magnesia) is a mild base which is usually used as an antacid.