Chlorine atoms come in two kinds. About 76% are chlorine-35, with a mass of 34.97 amu, and about 24% are chlorine-37, with a mass of 36.97 amu. Any real sample, a pinch of salt or a whiff of a swimming pool, contains both kinds in these proportions. The atomic mass is the average mass of one atom in that mixture: 0.7576×34.97+0.2424×36.97=35.45 amu.
It is a weighted average, not a plain one. The plain average of 34.97 and 36.97 is 35.97, but that would treat the two isotopes as equally common. Chlorine-35 is three times as common, so the average sits much closer to 35. This is why atomic masses are decimals, and why you can read them backward: carbon's 12.01 says natural carbon is nearly all carbon-12, with only about 1% carbon-13.
The mass number is a different, whole number. Chlorine-37 has 17 protons and 20 neutrons, so its mass number is 37: a count of particles in one particular atom. The atomic mass, 35.45, describes the typical atom of the element and is the value to use in calculations. The atomic number, 17, counts only protons and is not a mass at all.
Think of it like this. Atomic mass is like the average weight of an egg in a supermarket crate where three-quarters are medium and one-quarter are large: the average lands closer to medium, and no single egg weighs exactly the average. Unlike crates of eggs, though, an element's isotope mix is almost the same everywhere on Earth.
Core idea. An element's atomic mass is the average mass of its atoms, weighted by how common each isotope is. Because it averages isotopes of different mass, it is a decimal that lands closest to the most abundant isotope.