How an antacid tablets works?

Antacids contain basic compounds which neutralize excedentary acids in the stomach.