Explanation
Magnet and iron ball
Think of the nucleus as a magnet and the outer electron as an iron ball.
What is ionisation enthalpy?
The energy needed to remove the most loosely held electron from an isolated gaseous atom is the first ionisation enthalpy.
Sodium or chlorine?
Sodium or chlorine: which holds its outer electron tighter?
Chlorine. More protons, smaller atom, stronger magnet.
The trend
So ionisation enthalpy increases across a period and decreases down a group.
Exception 1: Be beats B
Exception one. Beryllium beats boron.
Boron's electron sits alone in two p, higher in energy and easier to remove. Beryllium must break a full two s pair.
Exception 2: N beats O
Exception two. Nitrogen beats oxygen.
Nitrogen's two p is exactly half-filled: extra stable. Oxygen has one paired electron that repels, so it leaves easily.
Second ionisation enthalpy
Second ionisation enthalpy is always higher than the first.
For sodium it jumps hugely, because the second electron comes from a stable noble gas core.
Worked example: Na, Mg, Al
Arrange sodium, magnesium, aluminium. The trend says sodium, magnesium, aluminium.
But aluminium's electron is in three p, so it drops below magnesium.