Atoms of the same element that differ in weight are called isotopes. Isotopes of an element have the same number of protons in their nucleus, which determines the element's identity, but they have different numbers of neutrons. This variation in the number of neutrons leads to differences in atomic mass.
For example, carbon has three isotopes: carbon-12, carbon-13, and carbon-14. All three isotopes have six protons (which makes them carbon), but they differ in the number of neutrons. Carbon-12 has 6 neutrons, carbon-13 has 7 neutrons, and carbon-14 has 8 neutrons. As a result, carbon-12 has an atomic mass of approximately 12 amu, carbon-13 has an atomic mass of approximately 13 amu, and carbon-14 has an atomic mass of approximately 14 amu.