Thermodynamics is the branch of science which deals with the relationship of heat with the other forms of energy it basically defines the conversion of thermal energy into other forms of energy and its effect on matter. The behaviour of the quantities of thermodynamics deal is ruled by the four laws of thermodynamics.
Two physical systems are said to be in thermal equilibrium if there is no exchange of heat between them while being connected to each other by a path which is permeable to heat. Thermal equilibrium follows by the zeroth law of thermodynamics. If the temperature within the system is temporarily and spatially uniform, then the system is said to be in a state of thermal equilibrium.