When you move the lever on the thermostat to turn up the heat, this rotates the thermometer coil and mercury switch, tipping them to the left.
As soon as the switch tips to the left, current flows through the mercury in the mercury switch. This current energizes a relay that starts the heater and circulation fan in your home. As the room gradually heats up, the thermometer coil gradually unwinds until it tips the mercury switch back to the right, breaking the circuit and turning off the heat.
When the mercury switch tips to the right, a relay starts the air conditioner. As the room cools, the thermometer coil winds up until the mercury switch tips back to the left.
Thermostats have another cool device called a heat anticipator. The heat anticipator shuts off the heater before the air inside the thermostat actually reaches the set temperature. Sometimes, parts of a house will reach the set temperature before the part of the house containing the thermostat does. In this case, the anticipator shuts the heater off a little early to give the heat time to reach the thermostat.
The loop of wire above is a kind of resistor. When the heater is running, the current that controls the heater travels from the mercury switch, through the yellow wire to the resistive loop. It travels around the loop until it gets to the wiper, and from there it travels through the hub of the anticipator ring and down to the circuit board on the bottom layer of the thermostat. The farther the wiper is positioned (moving clockwise) from the yellow wire, the more of the resistive wire the current has to pass through. Like any resistor, this one generates heat when current passes through it. The farther around the loop the wiper is placed, the more heat is generated by the resistor. This heat warms the thermometer coil, causing it to unwind and tip the mercury switch to the right so that the heater shuts off.
Next, we'll take a more detailed look at the electrical circuits in the thermostat.