Well, gravity gives a pull to all the Earth,pulling more on the more dense materials,which then lets the less dense "float"on top.  It turns out what we see as rock is the less dense hard stuff on Earth,so it floats on top of the Earth Core (really dense stuff).  Well, if the less dense stuff is floating, it can move, and we see that as a fancy worded concept called Plate techonics http://www.ucmp.berkeley.edu/geology/tectonics.html