Look up 'heat transfer'. This topical label is at the root of your questions. Heat may be transferred by Conduction, Convection, Evaporation (including transpiration in flora), and Irradiative transfer processes. Each form of heat transfer has its own mechanism and depends on the parametric definition of the system in question, including its boundary volume, boundary conditions and initial conditions.
I'm no PhD, just a Bachelors of Science; Engineering Science and Mechanics from Virginia Polytechnic Institute and State University (1988), and a lifetime spent applying physical mechanics.