
A tiny thing with many names, a Light-Dependent Resistor (LDR) is also known as photocell, photo resistor or CdS cell. It is a resistor whose resistance decreases with increasing incident light intensity. LDR is commonly used in electronic toys, auto flash camera, photo switch and many more.
It is easy to use, low-power and cheap. When it's dark, the resistance goes up to about 0.2MΩ and goes down to about 5-10kΩ when it is bright.
Use it like a normal resistor. The pins are non-polarized, you can connect the pins either way.