We start by counting the number of atoms of each element on each side of the reaction.
Now we balance the reaction by trial and error, starting with chlorine. We have 2 chlorine atoms in the reactants and 3 clear atoms in the products, so to balance we cross the coefficients placing 3 on the reactant side and two on the product side in the respective molecules:

Now we continue with the oxygens, we have 3 oxygens on the reactant side and 1 on the products, so we put the coefficient 3 on the products side in front of the respective molecule:

We now have the balanced equation. We have 3 Mg atoms, 6 Cl atoms, 2 Cr atoms, and 3 O atoms on each side of the reaction.