Cometary nuclei, as small, spinning, ice-rich objects revolving around the sun in eccentric orbits, are powered and activated by solar radiation. Far from the sun, most of the solar energy is reradiated as thermal emission, whereas close to the sun, it is absorbed by sublimation of ice. Only a small fraction of the solar energy is conducted into the nucleus interior. The rate of heat conduction determines how deep and how fast this energy is dissipated. The conductivity of cometary nuclei, which depends on their composition and porosity, is estimated based on vastly different models ranging from very simple to extremely complex. The characteristic response to heating is determined by the skin depth, the thermal inertia, and the thermal diffusion timescale, which depend on the comet’s structure and dynamics. Internal heat sources include the temperature-dependent crystallization of amorphous water ice, which becomes important at temperatures above about 130 K; occurs in spurts; and releases volatiles trapped in the ice. These, in turn, contribute to heat transfer by advection and by phase transitions. Radiogenic heating resulting from the decay of short-lived unstable nuclei such as 26Al heats the nucleus shortly after formation and may lead to compositional alterations. The thermal evolution of the nucleus is described by thermo-physical models that solve mass and energy conservation equations in various geometries, sometimes very complicated, taking into account self-heating. Solutions are compared with actual measurements from spacecraft, mainly during the Rosetta mission, to deduce the thermal properties of the nucleus and decipher its activity pattern.