In an atom, there are three different types of particles: protons, neutrons and electrons. The protons and neutrons are in the nucleus (the centre of the atom) and the electrons orbit the nucleus. The electrons are in 'shells', with the first shell containing 2 electrons, and any after this containing up to 8. The number of electrons on the outer shell of an atom defines which group of the periodic table it is in. For example, oxygen has 6 electrons in its outer shell, so it is in group 6 of the periodic table.