We know that light radiations travel in the form of photons (single packets of light) and that when these photons collide with any metal surface, electrons are ejected. This feature of light will be extremely helpful in understanding the photoelectric effect.
The photoelectric effect occurs when electrons with a specific minimum frequency (the threshold frequency) interact with each other. The photoelectric effect is caused by an impact on the metal's surface, which causes electrons to be expelled from the metal's surface
When electrons move with a frequency that is greater than the threshold energy in that case they will be converted into electric energy.