An atomic mass is the sum of the protons and neutrons of a given element. The atomic mass is given it what is called a weighted average of all the different kinds of that element. Take carbon for example. It has carbon-12, carbon-13, and carbon-14. The reason its atomic weight is so close to 12 (12.011 ish) is because carbon-12 is by far the most common, and carbon-13 and -14 are so uncommon, that the weighted average is close to 12, but not exactly 12.