Take-home message: Systems have a property, temperature, which is the same for two systems in thermal equilibrium
Two bodies are in thermal equilibrium if no heat flow occurs when they are brought into contact. This is an extension of the idea of equilibrium for a single system, when no net internal heat flow occurs.
The Zeroth law of thermodynamics says that if two bodies are separately in thermal equilibrium with a third body, they are also in thermal equilibriums with one another. All three are then said to be at the same temperature.
If the third body changes visibly as it is heated, then it can be used as a thermoscope to verify equality of temperature or to rank bodies according to temperature. This is independent of any numerical scale.
A thermometer is a calibrated thermoscope. Any thermoscope can be used to define a numerical
temperature scale over some range. Thermoscopes based on the volume of gases led finally to the ideal
gas temperature scale, measured in Kelvin and defined to be 273.16 K at the triple point of water:
A nice elementary site on the history of temperature from the US National Center for Atmospheric Research can be found here.
Off-line, Adkins and Zemansky each devote a whole chapter to the subject.
References