One event that may have led to the formation of the solar system is that the solar nebula collapsed and it began to rotate. The rotating cloud become hotter and denser in it's center,the gas and dust formed a disk mad cooled down enough to form dust particles that later collided to form larger particles.
The collision of particles began to form bodies the size of boulders these were called planetesimals the size depended on their distance between the center of the solar nebula. Planetesimals began to collide against each other, became larger pulled more gravity and became protoplanets.
Meanwhile the planets were forming,gas and dust near the center of the of the nebula grew denser and denser.It became so dense and hot that hydrogen atoms fused to create helium. As a result it released huge amounts of energy to have enough outward pressure to balance the inward pull of gravity,when the gas stopped collapsing our sun was born.
Scientists have divided the solar system into two parts. The Inner Solar System and the Outer Solar System. The inner solar system includes Mercury, Venus, Earth and Mars, these planets are the closest to the sun. The outer solar system includes Jupiter, Saturn, Uranus, and Neptune.