Heat always flows from substances of a warmer temperature to substances of a cooler temperature. Heat (thermal energy) will be exchanged in an environment until a common temperature (equilibrium) is achieved. This equalizing of temperature in an environment is caused by a combination of three basic types of heat transfer: conduction, radiation, and convection.
Conduction is the transfer of vibrating energy between adjacent molecule (Fig. 1). The transfer is always from the warmer region (i.e., faster vibration) to the cooler region (i.e., slower vibration). Conductive heat transfer can happen in any direction and is independent of gravity.
If a person place the palm of a hand flatly upon a surface, that surface will feel relatively warmer or cooler. Such a sensation is indicative of conductive heat transfer. A familiar demonstration of conduction is holding a mug filled with hot coffee. The hot coffee causes the molecules of the mug to vibrate more rapidly. Heat, therefore, is transmitted and soon thereafter enters the hand holding the mug. The faster (warmer) molecules will continue to transfer heat to the mug and hand until equilibrium is achieved.
How readily a substance conducts heat depends on its molecular structure. Typically, denser materials (e.g., concrete or steel) will conduct heat more readily than less dense materials (e.g., wood or mineral wool). Keep in mind that conduction depends on the transfer of vibrating energy between adjacent molecules. No molecules, no conduction. This is precisely why a near-vacuum space (such as the air space in an insulated glass unit) is effective at reducing heat transfer.