Thermometers measures temperature on the basis of thermal equilibrium. When a thermometer is put inside body to measure temperature, it gains heat from that body which in terns cause expansion of the liquid used inside the device. The expansion occurs until equilibrium is maintained on both side. Thus, the volume up to which the liquid expanded is the temperature of that body.