How does a thermometer work?
The marks and numbers on the tube measure the height of the mercury. If it shrinks down to the 32-mark, you will be shivering, and water will turn to ice. But when the mercury goes up as high as 90, you feel very hot.
Why does the line of mercury grow taller or shorter? Like everything else, mercury is made of tiny particles called molecules. The mercury molecules are always moving, bumping into each other and bouncing away. Even when the silvery line remains steady inside the tube, the molecules are shifting around and around. Heat makes them move faster. The fast-bouncing molecules shove each other farther and farther apart. So the mercury takes up more space, and it rises in the tube.
When the molecules get cold they move more slowly. Now they don't need so much bouncing space. They draw closer together, and the mercury goes down.