Detecting the presence or absence of light is easily achieved with a special type of resistor known as an LDR. LDRs are a low-cost light sensor, and we find them in many applications, from light-activated switches and lamps or as part of the circuit that dims your alarm clock display when it's dark, to part of alarm circuits on cash boxes and safes.
The following figure shows a typical LDR component, together with a few varieties of LDR schematic symbols. If you examine the symbols, you will notice that they are a resistor symbol with inward-pointing arrows. You can think of these arrows as representing light falling on the resistor:
An LDR varies its resistance with the relative light it detects. If you placed the terminals of your multimeter in Ohms mode across an LDR, you will find (roughly after a few seconds...