Magma in the Earth's mantle moves in convection currents. The hot core heats the material above it, causing it to rise toward the crust, where it cools. The heat comes from the intense pressure on the rock, combined with the energy released from natural radioactive decay of elements.