A light-dependent resistor (LDR) works by changing its resistance based on the amount of light it is exposed to. When light falls on the LDR, it causes the material inside the resistor to conduct more electricity, resulting in a decrease in resistance. Conversely, when there is less light, the resistance of the LDR increases. This property is used in various applications such as street lights, cameras, and automatic night lights.