when an electron absorbs a photon, its kinetic energy increases by an amount equal to the energy of the photon, if this exceeds the work function of the metal then the electron can leave, if it does not exceed the work function then the electron cannot leave, and collides with other electrons and ions so quickly loses the energy