Heat always flows from a warmer substance to a cooler one. In reality, the faster moving molecules transfer some of their energy to slower ones. Thus the faster molecules slow down a little and the slower ones speed up. Expressed simply, this means that when it is hot outside, the heat attemps to 'invade' colder interior spaces.
Heat can be transferred from one body to another by any of the following methods:
By a wave in motion (similar to light waves) in which energy is transmitted from one body to another without the need for intervening matter.
By the flow of heat between parts of a substance or from one substance ot another in direct contact.
By transfer via a fluid or air.