Antacids neutralize excess stomach acid by reacting with it to form salt and water.