A photo cell, sometimes called an electric eye, is like a tiny solar cell. When light hits the semiconductor material, it generates a DC electrical signal (small voltage and current)
Photocells are sensors that allow you to detect light. They are small, inexpensive, low-power, easy to use and don't wear out.
A photocell can be used to detect ambient light Or they can be paired with a light intended to shine on them in an alarm system etc (where they are used to detect when the light gets interrupted)