The law of conservation of mass says that no atoms are lost or made during a chemical reaction. The atoms are rearranged into new substances, so the mass of the products equals the mass of the reactants.
Because of this, a reaction can be shown as a symbol equation that is balanced. A balanced equation has the same number of atoms of each element on both sides of the arrow. For example, 2H2 + O2 → 2H2O is balanced.
Two kinds of number are used in equations. A big number in normal script in front of a formula is a multiplier, and it multiplies every atom in that formula. In 2MgO the multiplier 2 means 2 magnesium atoms and 2 oxygen atoms. A small number written lower down inside a formula is a subscript, and it multiplies only the atom just before it. In H2O the subscript 2 means 2 hydrogen atoms and 1 oxygen atom.
Putting both together, 2H2O contains 4 hydrogen atoms and 2 oxygen atoms. To balance an equation you change the multipliers in front of the formulae, never the subscripts inside them.