When an electron is present in the outermost shell of an atom, it is bound by nuclear force of attraction. In order to remove this electrons, some amount of energy should be supplied to overcome the nuclear force of attraction. During the addition of and electron to a neutral atom, the electron approaches to a neutral atom due to nuclear force of attraction. This process involves work done towards the force of attraction and hence energy is released. Thus, ionization potential is the energy absorbed and electron affinity is the energy released.