Dow interview question

How does a thermostat work?