An atom has a tiny, dense nucleus containing protons and neutrons. Electrons move around the nucleus in energy levels called shells. Almost all of the mass of an atom is in its nucleus.
The atomic number is the number of protons. In a neutral atom, the number of electrons equals the number of protons. The mass number is the total number of protons and neutrons, so neutrons = mass number − atomic number.
For the first 20 elements, electrons fill the shells in order: up to 2 in the first shell, up to 8 in the second, up to 8 in the third, and then the fourth shell starts. Calcium, with 20 electrons, is 2, 8, 8, 2.
Example: an atom of sodium has atomic number 11 and mass number 23. It has 11 protons, 23 − 11 = 12 neutrons and 11 electrons, arranged 2, 8, 1.