If you put a glass of water out into the sunlight for example, the radiation from the sun can increase the energy in the water. Areas of the water that possess greater average kinetic energy rise due to a process known as convection. Convection
is heat transfer due to the movement of the substance itself.
When you heat water, for example, it expands and the density therefore decreases. As a consequence of this, it is able to rise to the surface.