what is the history behind the formation of the system?
The Solar System formed 4.568 billion years ago from the gravitational collapse of a region within a large molecular cloud.
Solar System
The Solar System formed 4.568 billion years ago from the gravitational collapse of a region within a large molecular cloud. 
earth is what number planet from the sun Third how many planets does this system of sun consists of? Nine
wiki:25688681
Solar System [SEP] Formation and evolution
The ejected outer layers will form what is known as a planetary nebula, returning some of the material that formed the Sun—but now enriched with heavier elements like carbon—to the interstellar medium.