The answer is conduction. There are three mechanisms of heat transference: conduction, convection and radiation. Conduction is the transference of heat between layers (particles) in direct contact; it is due to the vibration of the atoms that form the substances. Convection takes place in fluids (gases and liquids) and is due to the translation (motion) of the fluid, this is hot masses of the fluid translate and replaces cold masses. Radiation is the transmission of heat due to electromagnetic waves and do not require a medium (conduction and convection transfers through a medium): the Sun heats the Earth by radiation.