Percent composition tells you which types of atoms (elements) are present in a molecule and their levels. Percent composition can also tell you about the different elements present in an ionic compound as well.
Let's look at two examples
The molar mass of #H_2O# is 18 g/mol The hydrogens make up 2g (since each mole of hydrogen is 1g)
The oxygen makes up 16g.