Why does the liquid expand in a thermometer when it gets hotter?

In a thermometer is a liquid metal called Mercury, so the liquid expands when it is heated up.