Atomic mass
The atomic mass ("m") is the mass of an atom. Its unit is the unified atomic mass units ("abbr." u) where 1 unified atomic mass unit is defined as of the mass of a single carbon-12 atom, at rest. For atoms, the protons and neutrons of the nucleus account for nearly all of the total mass, and the atomic mass measured in u has nearly the same value as the mass number.
Chemical element
The mass number of an element, "A", is the number of nucleons (protons and neutrons) in the atomic nucleus. Different isotopes of a given element are distinguished by their mass numbers, which are conventionally written as a superscript on the left hand side of the atomic symbol (e.g. U). The mass number is always a whole number and has units of "nucleons". For example, magnesium-24 (24 is the mass number) is an atom with 24 nucleons (12 protons and 12 neutrons).