How to balance a chemical equation
When balancing a chemical equation, you change the coefficients in front of each compound. It is most common to use only integers, but you can also use fractions if you like. Like in a mathematical equation you can always just multiply with the same number throughout the equation and obtain integer coefficients that way. Be aware, that you are not allowed to change the numbers in subscript. These are part of the chemical formula, and cannot be changed.
Example: On the images below you see the reaction between Hydrogen molecules, H2, and Oxygen molecules, O2, to form water, H2O. When you count the number of atoms on either side of the arrow in the equations on the first image, you should reach the conclusion that the equation is not balanced: On the left hand side we find two hydrogen atoms and two oxygen atoms, whereas on the right hand side we find two hydrogen atoms and only one oxygen atom.
In order to balance the equation above, we need to add more water molecules to the right-hand side. See the equation on the second image.
Now the number of oxygen atoms are the same on both sides, but now there are four hydrogen atoms on the right-hand side and only two on the left-hand side. We need to add another hydrogen molecule to the left-hand side. Now the equation is balanced, see the third image.