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. We say that mass is conserved. For example, 24 g of magnesium reacts fully with 16 g of oxygen to make 40 g of magnesium oxide.
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 magnesium burning: 2Mg + O2 → 2MgO. There are 2 magnesium atoms and 2 oxygen atoms on each side.
The big number written in normal script in front of a formula is a multiplier. It multiplies every atom in that formula, so 2H2O contains 4 hydrogen atoms and 2 oxygen atoms. A small number in subscript inside a formula only multiplies the atom directly before it, so H2O has 2 hydrogen atoms and 1 oxygen atom. To balance an equation you change the multipliers, never the subscripts.