Here's the chemical reaction:
MgCO₃ (s) + 2H⁺ (aq) → Mg²⁺ (aq) + CO₂ (g) + H₂O (l)
* MgCO₃ is magnesium carbonate (solid)
* H⁺ represents the hydrogen ions from the acid (aqueous)
* Mg²⁺ is magnesium ions (aqueous)
* CO₂ is carbon dioxide gas
* H₂O is water (liquid)
The reaction produces carbon dioxide gas, which is why you would see bubbles forming in the solution.