Antacids work by neutralising stomach acid, providing quick relief from discomfort caused by excess acid production.