How Does a Dryer Moisture Sensor Work?

There are a few basic ways a dryer moisture sensor can work.
Thermostat
This is the simplest set-up, and unsurprisingly the least effective. An opening inside the dryer connects to a thermostat. The dryer the clothes get, the more the opening is uncovered, allowing heat to reach the sensor. When it senses a certain amount of heat, the thermostat shuts down the dry cycle.

"Fingers"
Look inside your dryer and you may see two prongs or "fingers" near the back. Wet clothes are heavier, and as the cycle spins, they will cause the two fingers to stick together, indicated to the dryer that the clothes need more time. This system is generally more reliable than the thermostat system, but can become problematic if grime builds up, causing the fingers to think they're "stuck" when nothing is there.
Conductive Sensor
The most sophisticated and expensive dryers have a sensor that can detect the electrical resistance present in its contents. Since water is conductive of electricity, wet clothes have greater conductivity.
Simpler sensor systems can be confounded by the presence of lint or other build up, and even the best sensor is far from perfect. Therefore, it is wise to always keep an eye on your clothes as they dry—the best sensor is you!