When two bodies at different temperatures are in contact with each other, heat flows from the body at a higher temperature to a body at a lower temperature.
When two bodies are brought in contact the quantity of heat lost by the hot body is equal to the quantity of heat gained by the cold body so that there is no change of state.