Seem to remember from school chemistry that it's magnesium carbonate, MgCO3, which is very similar to chalk (calcium carbonate. It is a slightly basic (ie alkaline)suspension that neutralises excess acid in the stomach. The action releases carbon dioxide (CO2).