A liquid thermometer has a tube which contains usually liquid mercury or alcohol. These liquids expand at a constant rate with a rise in temperature. The manufacturer of the thermometer calibrates it and puts the temperature markings on it so that you can use it to measure temperature. Other thermometers work on a similar principle in that they contain something which changes with temperature in a known way and can then use this to tell you what the temperature is.