In fluids, heat is often transferred by convection, in which the motion of the fluid itself carries heat from one place to another.
Another way to transfer heat is by conduction, which does not involve any motion of a substance, but rather is a transfer of energy within a substance (or between substances in contact).
Meaning its either by convection or conduction !
Hope this helps!