Antacids perform a neutralization reaction, increasing the pH to reduce acidity in the stomach. When gastric hydrochloric acid reaches the nerves in the gastrointestinal mucosa, they signal pain to the central nervous system. This happens when these nerves are exposed. So it is used for treatment of indigestion.