The Earth formed from the dust and gas present in the early solar system. Over time, these materials came together due to gravity , forming our planet.