Collisions in the huge disc-shaped cloud of material that also generated the Sun are believed to have formed the Earth some 4.6 billion years ago.
Gravity gradually clumped this gas and dust into clumps that produced asteroids and tiny early planets known as planetesimals. These particles collided repeatedly and grew in size, eventually forming the Solar System's planets, including Earth.
The specifics of how the Earth came to be are still being worked out. Scientists investigate meteorites and the oldest rocks on Earth to learn more about what happened in the Solar System's early days. They also observe other solar systems in our Milky Way galaxy. Okay then, let's watch the video to get an idea of our planet's past: