The study of the movement of heat from one body to another and the reactions between heat and other forms of energy.

See: The Three Laws of Thermodynamics

Thermodynamics studies the dynamics of heat, or the flow, production, and conversion of heat energy into work.
It arose from the study of the steam engine and other "heat engines" that convert heat into mechanical work. The results of that work have effected branches of philosophy.