In the photoelectric effect, the electromagnetic wave is thought to exist as quanta (discrete packets) of energy, called photons. When an EM wave is directed at a metal surface, the photons are absorbed by the electrons, causing them to be emitted from the surface. This will only happen if the photon has greater energy than the work function energy of the metal. The kinetic energy of the electrons depends on the energy of the photon- the maximum KE of an electron emitted is equal to the energy of the photon minus the work function of the metal. The number of electrons emitted depends on light intensity, as a higher light intensity means more photons of light and therefore more electrons emitted.