The Earth was formed about 4.5 billion years ago when leftover dust particles from The Sun's formation clumped together and turned into rocks and boulders, thus the force of gravity drew the rocks together over millions of years to form the inner rocky planets, including Earth.