The solar system began to form about 5 billion years ago.After that the sun began to form a few million years later.Then the planet Earth began to form about 4.6billion years ago and grew by colliding with space debris.The Volcanoes emitted gas forming the atmosphere.By 2.2 billion years ago the Earth most likely started to form how it looks like today