In the stomach, the enzyme pepsin has the function to break proteins into smaller units-polypeptides. Pepsin is synthesized and secreted in an inactive form- pepsinogen. Activation energy (the minimum amount of energy that is required to activate an enzyme) is achieved in the acidic medium (pH from 1 to 3). So, the activation of pepsin (conversion of pepsinogen to pepsin) is possible thanks to the cells in the stomach lining which produce hydrochloric acid (HCl), causing the stomach contents to have a low pH.
Antacids neutralize the acid made by the stomach, affecting the digestion.