The distribution of heat energy in a system determines the direction of heat flow. Heat flows from regions of high energy to regions of lower energy until the energy in both regions becomes the same.
The amount of heat energy of a certain mass or volume of material is called the enthalpy, and it is directly proportional to the temperature of the material. Heat flows from high- to low-temperature regions because the enthalpy in the high-temperature regions is higher than in the low-temperature regions. As the difference in temperature between two regions increases, the rate of heat flow correspondingly increases.
The process can be likened to a ramp, in which the difference between the higher and lower temperature sides are the higher and lower sides of the ramp respectively. As the steepness of the temperature-gradient ramp increases, heat flow, likened to water or a ball going down the ramp, also increases.
Different materials have different thermal conductivities, making it so that even when the temperature difference between the regions of identically shaped, but different, materials are the same, the rate at which heat flows through the two materials is not the same. Revisiting the ramp analogy, this thermal conductivity can be likened to the roughness or smoothness of the ramp. Materials with high thermal conductivity have smooth ramps, whereas those with low conductivity have rough ones.