Our solar system formed about 4.5 billion years ago from a dense cloud of interstellar gas and dust.
The cloud collapsed, possibly due to the shockwave of a nearby exploding star, called a supernova.
When this dust cloud collapsed, it formed a solar nebula – a spinning, swirling disk of material.