A balanced symbol equation can be read in terms of moles. The balancing numbers show how many moles of each substance take part. In Mg + 2HCl → MgCl2 + H2, one mole of magnesium reacts with two moles of hydrochloric acid to produce one mole of magnesium chloride and one mole of hydrogen gas.
This lets us calculate the masses of reactants and products. First convert the known mass to moles using moles = mass ÷ relative formula mass. Then use the ratio in the equation to find the moles of the substance you want. Finally convert back to a mass using mass = moles × relative formula mass.
Example: 12 g of magnesium (Ar = 24) is 12 ÷ 24 = 0.5 mol. The ratio of Mg to H2 is 1 : 1, so 0.5 mol of hydrogen forms. Hydrogen has an Mr of 2, so the mass of hydrogen is 0.5 × 2 = 1 g. The ratio of Mg to HCl is 1 : 2, so 1.0 mol of HCl is needed, which is 1.0 × 36.5 = 36.5 g.