The energy required to remove an electron from an atom is called ionisation energy.
More correctly, the ionisation energy is the energy needed to remove an electron from one mole of an element in a gaseous state.
The energy required to remove the outermost electron is called the first ionisation energy.
Energy is required to remove electrons because the positively charged nucleus attracts the electrons.
Successive ionisation energies become larger; successive electrons are attracted more strongly to the nucleus since they are closer to it.
However, the increase is not uniform, since electrons are arranged in shells. The closer the shell is to the nucleus, the greater the ionisation energy.
For example, magnesium has an electron configuration of 2,8,2. The third electron to be removed will have a relatively high increase in ionisation energy than the second electron to be removed, since it is in the second shell rather than the third shell.
Successive ionisation energies increase as the charge on the ion being formed increases.
Successive ionisation energies increase a lot if the electron is removed from a shell closer to the nucleus.