A huge nebula, a cloud of dust and gas, contracted to form a star.
Later debris outside the star condensed to form planets.
Some planets that where unstable collided and fell into the sun or got lost. After all the unstable planets where gone the stable ones remained, which is the planets that is in our system right now.
All the planets orbit in the same direction as the Sun rotates, suggesting they all formed from the same gas cloud.
Now today we have all our planets Mercury, Venus, Earth, Mars ,Jupiter, Saturn, Uranus, and Neptune. Also the big bright star the sun!