For example, when molten rock comes up from a volcano, it will give off heat to the atmosphere until the rock and the atmosphere are at the same temperature. Even though the two systems (rock and air) are very different, thermal equilibrium allows a definition of temperature for both.