At one time, the earth was just one large supercontinent called Pangaea. And Pangaea was a rigid form of rocks floating on the asthenosphere . Like a group of boats in the middle of a lake, they drift apart over time. That's what happened to Pangaea and eventually seven continents were formed.
Plate tectonic map by C. R. Scotese, PALEOMAP Project (www.scotese.com)