A photodiode is a semiconductor device that converts light into an electrical current.
The current is generated when photons are absorbed in the photodiode.