Energy can be transmitted through a medium in one of 3 ways:
Conduction - This occurs when particles of a substance collide with one another, transferring some of their energy to each other in the process. This generally occurs most rapidly in solids due to the close proximity and order of the particles, and most slowly in gases, due to the sparse nature of the particles.
Convection - This occurs when a fluid has a temperature gradient decreasing with increasing altitude. For example, when a pan of water is heated, the higher energy water molecules at the bottom have a lower density than the lower energy molecules at the top of the pan and travel upwards through the liquid, while their place is taken by the lower energy molecules. This phenomenon also occurs in gases (think hot air balloon).
Radiation - This does not involve the movement of particles whatsoever, instead the energy is being transferred in the form of electromagnetic radiation (such as light). This is how the Sun heats the earth, as there are very few particles in space, certainly not enough for conduction/convection. (Note: this does technically involve the movement of particle called photons that make up the radiation, but they are not treated as physical particles like molecules).