The two main types of bases used in antacids are carbonates and hydroxides. These are weak bases that serve to neutralize the acidity of the stomach.
Examples of common antacid bases include aluminum hydroxide, magnesium carbonate and sodium bicarbonate.
The bases interact with hydrochloric acid to produce either water, carbon dioxide or both. The reaction also eliminates the chloride component of hydrochloric acid. For example, magnesium carbonate reacts with hydrochloric acid to produce magnesium chloride, water and carbon dioxide.
This reduces the availability of hydrochloric acid in the stomach. As a result, there is less risk of acid refluxing back into the esophagus to cause heartburn.