Timeline 4.7.4 billion years ago Formation of our Solar System

Artist's concept of a protoplanetary disk, where particles of dust and grit collide and accrete forming planets or asteroids
Artist’s concept of a protoplanetary disk, where particles of dust and grit collide and accrete forming planets or asteroids

The Solar System  was formed from a large. rotating cloud of interstellar dust and gas called the solar nebula.

Hit by a shock wave from a nearby supernova, a large. rotating cloud of interstellar dust began to rotate. As the cloud began to accelerate, it flattened it into a disk centering its axis of rotation. 

The sun is formed

Shock waves through icy parts of the solar nebula may be the mechanism that enriched ancient meteorites (called chondrites) with water -- water that some believe provided an otherwise dry Earth with oceans.
Shock waves through icy parts of the solar nebula may be the mechanism that enriched ancient meteorites (called chondrites) with water — water that some believe provided an otherwise dry Earth with oceans.

The matter in the center compressed and heated and the  star now known  as our sun ignited.

The Planets are formed

Chaos caused small collisions to form into clumps of stardust with successively larger fragments of dust and debris clumped together to form the planets.

A last a great solar wind emanating from the the newly formed sun cleared out the material in the disk that had not already condensed into the planets.