How the thermometer works?

How the thermometer works?