Moles and molar mass
A mole is a way of counting particles. To convert a mass into moles, divide the mass by the molar mass of the substance.
A worked example
To find how many moles are present in 60 g of carbon dioxide, use the molar mass of CO2, which is 44 g/mol, so the amount is 60 / 44 = 1.4 mol.
The mistake people actually make
Molar mass comes from adding together the masses of every atom in the formula, so for water, H2O is 2(1.01) + 16.00 = 18.02 g/mol.