Thermal equilibrium occurs when two substances in contact stop exchanging heat energy and reach the same temperature. This happens because heat naturally flows from hotter to colder substances, increasing the temperature of the colder substance until they are the same. The zeroth law of thermodynamics states that if two systems are in thermal equilibrium with a third system, they are also in equilibrium with each other. When thermal equilibrium is reached, the substances have equalized their microscopic kinetic energies such that heat no longer flows between them.