Hello, Kirsten,
Molar mass is the mass of that compound or element that provides Avogadro's number of particles (molecules), which is 6.02 x 10^23, or one mole. The atomic weights of every element, when measured out in grams, provide Avogadro's number of atoms. For compounds, the sum of all the elements is added to generate the molar mass for that compound.
For O2: the atomic mass of O is 16, so O2 would be 32. That means the molar mass of O2 is 32 grams/mole. If you measure 32 grams of O2, you'll have one mole of O2 molecules.
For H2O: Add each element's atomic weight. Each H is 1 and the O is 1. So add 2 hydrogens (2) and one oxygen (16) to get the molar mass of water, which is 18 g/mole.
For glucose: The 6 carbons add to 72 (6 x 12), the 12 hydrogens to 12 and 6 oxygens to 96, for a total of 180 grams/mole.
Bob