To balance a chemical equation, one has to make the total number of molecules of each element equal on both sides of the equation.
For example,
in the reaction of sodium (Na) and chlorine (Cl2), we get sodium choride (NaCl)
Na + Cl2--->NaCl
Now one chlorine molecule contains 2 atoms of Cl and one Na molecule contains 1 atom of Na
To balance, we have to take 2 Na molecules,
2Na + Cl2 ---> NaCl
Balancing both sides we get
2Na + Cl2 = 2NaCl
Here both sides of the chemical equation contains equal number of molecules of each element, so it is a balanced equation.