You'll need a periodic table for this. If you consider chlorine (Cl) first, you'll notice that there are two numbers written above/below it.
The smaller of these, a whole number, is the 'atomic number' and is the number of protons in the atom. If the atom is neutral, then this number is also the number of electrons in the atom so that the charges balance to zero
The larger of these is the 'mass number', and is equal to the total mass of the atom. Each proton and neutron has a mass of around 1 atomic mass unit, so if you subtract the atomic number from the mass number you get the number of neutrons in the atom
Therefore:
Chlorine - 17 protons, 17 electrons, 18 neutrons
Calcium - 20 protons, 20 electrons, 20 neutrons
Magnesium - 12 protons, 12 electrons, 12 neutrons