The formation and the evolution of the Solar System are determined by a model widely accepted today, which implicates an initial cloud of molecules and solid-state dust species, the solar nebula. This nebula began to exist 4.56 to 4.57 billion years ago. Most of the mass of the initial cloud collapsed in the center of this region, forming the Sun, and the rest of the gas and dust particles formed the protoplanetary disk from which the planets, the moons, asteroids and other small bodies of the Solar System formed. All of these were formed by "accretion". Firstly, as a result of direct contact, the dust grains aggregated into blocks of 1 to 10 kilometers in diameter; then, in turn, these blocks collided with each other to form larger bodies of about 5 km wide, the planetesimals; the latter gradually increased as new collisions occurred, growing at a rate of a few centimeters per year for the next few million years.
The internal Solar System, the region of the system at less than 4 astronomical units* (AU) from the Sun, was too hot for volatile molecules such as water and methane to condense: the planetesimals that formed there could consist only of chemical components such as metals (e.g. iron, nickel and aluminum) and silicate rocks. These rocky bodies became the terrestrial or “telluric” planets: Mercury, Venus, Earth and Mars.
The giant gas planets, Jupiter, Saturn, Uranus and Neptune, were formed outside the “snow line”. The ice that formed the gaseous giants was more abundant than the metals and silicates that formed the telluric planets. This allowed the giants to become massive enough to eventually capture hydrogen and helium, the lightest but also the most abundant elements of the Universe.
The Solar System has evolved considerably since its initial formation. Many moons have formed from the gaseous and dusty disc encircling their associated planets, while others are thought to have been formed independently and then captured by a planet, or have been the result of cataclysmic collisions. The positions of the planets have slipped significantly.
This planetary migration saw Jupiter first migrating to the Sun, as well as Saturn. Then, these two giants went into resonance, which reversed their race, a phenomenon called the "Grand Tack". This has placed them in their present positions and allowed the terrestrial planets to be where they are currently found, with the masses we are currently observing.
* AU = distance between the Sun and the Earth (~150 million km)