The mantle is a layer of hot compressed rock underneath the liquid outer core, which means that it is much hotter. It is heated by the inner core, and the magma rises upward towards the outer core. This eventually cools and sinks back down, only to be heated up again, and this goes on and on in a constant cycle.