Heat transfer or, to use the current expression, the transfer of thermal energy is the transmission of this energy from one region to another, under the influence of a temperature difference.
Three transmission modes are classically recognized: conduction, radiation and convection.
However, we mustn't forget cases of transfer between two phases of the same body (solid-liquid and liquid-vapor, for example). In these cases, energy sinks or sources are created without any change in temperature, under the influence of changes in the respective masses of the two phases over time.
Although this aspect can be reduced to a special case of conduction with time-varying geometric phase boundaries, we will not deal with it here, and refer the reader to the articles "Heat transfers associated with boiling or condensation" and "Transfers by solid-liquid change of state" in this treatise.
In the conductive mode, heat diffuses from one particle to the next by shocks; this mode therefore requires the presence of matter, but without any macroscopic displacement.
In solid bodies that are either totally opaque or totally transparent to radiation, this is the only mode of transmission.
In semi-transparent solids, both radiation and conduction are involved (see the article "Thermal radiation of semi-transparent materials" in this treatise).
In deformable fluids, this distinction remains, but in all cases convective transfer is added by the relative displacement of the various non-isothermal parts of the fluid with respect to each other (see the article "Convective heat transfer" in this treatise).
At the microscopic level, the conductive problem is very complex and we won't consider it here. We'll assume a continuous medium.