Magaldrate is an antacid that neutralizes excess gastric hydrochloric acid, helping reduce stomach acidity. Simethicone is an antiflatulent that reduces the surface tension of gas bubbles in the gastrointestinal tract, allowing smaller bubbles to combine and be expelled more easily.