The earliest form of thermometer was invented by Galileo between 1592 and 1603. The basic idea was refined by various scientists over the centuries, since temperature measurement is a very important activity. Daniel Fahrenheit (he of the temperature scale) invented the first mercury-in-glass thermometer somewhere between 1714 and 1724.
Other temperature-measuring technologies were to follow. In 1871, in his Bakerian Lecture, Sir William Siemens proposed the resistance thermometer: “it is shown that, in taking advantage of the circumstance that the electrical resistance of a metallic conductor increases with an increase of temperature, an instrument may be devised for measuring with great accuracy the temperature at distant or inaccessible places, including the interior of furnaces, where metallurgical or other smelting-operations are carried on… In measuring furnace temperatures the platinum-wire constituting the pyrometer is wound upon a small cylinder of porcelain contained in a closed tube of iron or platinum, which is exposed to the heat to be measured.”
The most fun way to measure temperature is probably the inaccurately named “Galilean thermometer,” with its colourful glass balls floating in a liquid column: