Photosensors or photodetectors are sensors of light or other electromagnetic energy. There are several varieties:

Most optical detectors are quantum devices in which an individual photon produces a discrete effect.
The circuit diagram for the Line Follow Sensor board is shown below:

The board is connected directly to the Light IO board via PL4.
This circuit is very simple. +5V is applied via PL4 pin 4 to the circuit, and 0V is connected to pin 1 of PL4. When power has been applied, which is controlled by the processor1 board, Infra-Red LEDs D1 and D2 will emit Infra-Red light. If you