Hey there!
Mg + HCl → MgCl₂ + H₂
Balance Cl.
1 on the left, 2 on the right. Add a coefficient of 2 in front of HCl.
Mg + 2HCl → MgCl₂ + H₂
Balance H.
2 on the left, 2 on the right. Already balanced.
Balance Mg.
1 on the left, 1 on the right. Already balanced.
Our final balanced equation: Mg + 2HCl → MgCl₂ + H₂
Hope this helps!