Example:
CH4 + 2 O2 → CO2 + 2 H2O
In the balanced equation above, 1 mole of CH4 will react with 2 moles of O2 to produce 1 mole of CO2 and 1 mole of H2O.
The mass of 1 mole of CH4 = 12 + (4 * 1) = 16 grams
The mass of 2 moles of O2 = 2 * 32 = 64 grams
Total mass of reactants = 16 + 64 = 80 grams
The mass of 1 mole of CO2 = 12 + (2 * 16) = 44 grams
The mass of 2 moles of H2O = 2 * 18 = 36 grams
Total mass of products = 44 + 36 = 80 grams
Before the reaction, there was 80 grams of matter, and after the reaction there is 80 grams of matter!
Matter is conserved!