The earth's core is constantly vibrating, which shifts all the magma around it. As the magma moves, and circulates, it moves the tectonic plates on top. As the plates move, the continents go with it. Most of the time, two plates will collide with each other and one will go underneath. That rock melts and goes down to the bottom because it is cooler than the rest of the rock. Therefore, to hotter rock goes up. The magma is like an escalator for the plates on top, they are moving because the magma underneath is also moving.