Here's the balanced chemical equation for the reaction:
Mg(s) + 2HCl(aq) → MgCl₂(aq) + H₂(g)
You can recognize the hydrogen gas being produced by the bubbles that form in the solution.