Ionization energy is the energy required to remove one electron from an atom in its gaseous state.
In general, ionization energy increases across a period on the periodic table since atomic radius decreases across the period. The electrons are closer to the nucleus, and it becomes harder to remove an electron. Ionization energy decreases down a group since atomic radius increases down the group and there are additional shells that shield the attractional force of the nucleus on the valence electrons.
The trend across a period has two main exceptions, between group 2 and 3 and between group 5 and 6.
The ionization energy for group 3 is lower than the ionization energy for the element in group 2 and in the same period. This is because, for group 3, the outermost electron is in the p-orbital, while the outermost electron is group 2 is in the s-orbital.
For example, aluminum in group 3 has the electron configuration
The ionization energy for group 6 is lower than the ionization energy for the element in the same period in group 5. This is due to the spin of electrons when they fill a shell (from the Hund's Rule and the Pauli's exclusion principle). In group 5, the spins inside the p-orbital are