Every object with a temperature over the absolute zero point (0 Kelvin = -273,15 °C) emits infrared (IR) radiation. The human eye cannot perceive this, as it is more or less blind at this wavelength. Not the thermal imager. Its central element, the detector, is sensitive to IR radiation. Based on the intensity of the IR radiation, it determines the temperature of the object's surface, and makes it visible for the human eye with a thermal image. This process is referred to as thermography.
In order to make the IR radiation visible, the detector records it, converts it into an electric signal, and gives each signal a certain colour which is then shown in the display of the thermal imager. In principle, thermal imagers thus translate wavelengths from the infrared spectrum into wavelengths which are visible to the human eye (colours).
Incidentally, contrary to a relatively common misconception, one cannot look inside an object with a thermal imager, one can only visualize its surface temperature.