CAE interview question

How does a thermostat work