Isotopes
All carbon atoms have 6 protons and 6 electrons.
Most carbon atoms have 6 neutrons but not all. Some have 7 and some have 8.

Different forms of carbon like this have the same chemical properties (the word isotope means same properties) but the more neutrons they have the heavier they are.
There is another difference also. If an atom has to few neutrons or too many neutrons then its nucleus is unstable. At some time in the future the nucleus will chuck out a particle to try and become more stable. These isotopes are said to be radioactive. They are radioisotopes.
Carbon 12 and carbon 13 are stable. carbon 14 atoms are unstable. At some time in the future, like popcorn in a pan, they will pop.
Here are some isotopes of Magnesium
| Isotope | Mg 22 | Mg 23 | Mg 24 | Mg 25 | Mg 26 | Mg 27 | Mg 28 |
| Protons | 12 | 12 | 12 | 12 | 12 | 12 | 12 |
| Neutrons | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| Percentage | < 0.1% | < 0.1% | 79% | 10% | 11% | < 0.1% | < 0.1% |
| Stable? | no | no | yes | yes | yes | no | no |
So this is why some atoms are radioactive. Certain isotopes of different elements have unstable nuclei.