As heated material gets closer to the surface, it begins to cool
Explanation:
The core and surface have very different temperatures where the core is extremely hot as compared to the surface. When mantle gets heated as it passes near the core, it rises towards the surface. When it reaches the surface, it begins to cool and becomes more dense. The cooled magma then starts to sink down back near the core where it gets heated again and rises. This is what drives convection currents.