The transfer of heat energy between two or more bodies, or within a body, due to a temperature gradient.