You use electrons to balance the charges.
Notice that both your redox reactions have neutral atoms (or molecules) on one side of the equation, and ions on the other.
A neutral atom becomes an ion if it gains or loses electrons. More specifically, it becomes a positive ion, or cation, if it loses electrons, and a negative ion, or anion, if it gains electrons.
Take a look at the first half-reaction
Notice that you go from a neutral compound to a 2+ cation. This means that the magnesium atom has lost 2 electrons. In order to balance the overall charge of the reactants with the overall charge of the products, add the electrons on the cation's side of the equation.
The second half-reaction features the chlorine molecule,
This time you have an anion on the products' side, which means that electrons have been gained by the neutral chlorine molecule.
An important thing to notice is that you have 2 atoms of chlorine on the reactants' side and only 1 on the products' side. To balance the number of atoms, multiply the anion by 2
Now for the charge. Notice that you have an overall charge of 2- on the products' side - each of the two chloride anions has a 1- charge.
This means that the molecule must gain 2 electrons.
Now the two half-reactions are balanced.