Atoms are far too light (~10⁻²⁷ kg) to weigh on any balance, so chemistry uses a relative mass scale instead of absolute mass. IUPAC fixed the carbon-12 atom as the standard: one atomic mass unit (1 amu or 1 u) is defined as one-twelfth of the mass of a carbon-12 atom in its ground state (1 u ≈ 1.6605 × 10⁻²⁷ kg).
Relative atomic mass (Aᵣ) of an element = (average mass of its atom) ÷ (1 u). Because most elements are naturally a mixture of isotopes (same number of protons, different numbers of neutrons, hence different mass), the atomic mass we use is an average atomic mass: the abundance-weighted average across all naturally occurring isotopes.
Method for average atomic mass: multiply each isotope's mass by its percentage abundance, add the results for all isotopes, and divide by 100. Example: chlorine's two isotopes, mass 35 (77% abundant) and mass 37 (23% abundant), give an average atomic mass of ((35×77)+(37×23))/100 = 35.46 u.
Relative molecular mass of a compound = the sum of the relative atomic masses of every atom in its formula (since a molecule is just a fixed collection of bonded atoms). For example, glucose (C₆H₁₂O₆) has relative molecular mass (6×12) + (12×1.008) + (6×16) = 180.096 u.
Molar mass is numerically identical to relative atomic/molecular mass, but expressed in g mol⁻¹ instead of the unitless u -- it is the mass of exactly one mole of the substance (see Mole Concept and Molar Mass).
Relative atomic/molecular mass compares an atom's or molecule's mass to 1/12 the mass of carbon-12; average atomic mass accounts for natural isotope abundance; molecular mass is the sum of a formula's atomic masses.