When a free electron gets close enough to an atom to be pulled in toward the nucleus, it adds to the atom which then becomes an anion. The energy associated with this process is the electron affinity.