CAE Interview Question

How does a thermostat work