Isotopes are atoms of the same element that have different numbers of neutrons. The atomic mass of an element is an average value that takes into account the abundance of its isotopes. It is calculated using the relative abundance and mass of each isotope. For example, magnesium has three naturally occurring isotopes - 24Mg, 25Mg, and 26Mg. Calculating the weighted average of their relative abundances and masses gives the atomic mass of magnesium as 24.31 amu. Radioactive isotopes can be used for applications like carbon dating and medical diagnostics or treatment due to their ability to undergo radioactive decay.