He proposed that light is made up of packets of energy called photons. The photoelectric effect works like this. If you shine light of high enough energy on to a metal, electrons will be emitted from the metal. Light below a certain threshold frequency, no matter how intense, will not cause any electrons to be emitted. Light above the threshold frequency, even if it's not very intense, will always cause electrons to be emitted.
Electrons can gain energy by interacting with photons.
If a photon has an energy at least as big as the work function, the photon energy can be transferred to the electron and the electron will have enough energy to escape from the metal. A photon with an energy less than the work function will never be able to eject electrons. Before Einstein's explanation, the photoelectric effect was a real mystery. Knowing that light is made up of photons, it's easy to explain now. Convincing evidence for the fact that photons have momentum can be seen when a photon collides with a stationary electron.