A photodiode is a semiconductor device that converts light into an electrical current. When light strikes the photodiode, it generates electron-hole pairs within the semiconductor material. These electron-hole pairs create a flow of current, which can be measured as the output of the photodiode. This process is known as the photovoltaic effect. The amount of current produced is directly proportional to the intensity of the light falling on the photodiode.