While the crust of the Earth has been cooled down for millions of years, the inside is still hotter than the surface of the sun. The mantle that the tectonic plates are sitting on is constantly moving, causing the plates to move along with it. Basically the tectonic plates move around on the mantle like a beach ball does on water.