So this spacecraft took 12 years to go most of the way across our solar system. The planets were formed when the sun was formed. Stars such as our sun are formed when a cloud of gas and dust collapses from its own gravity. The center tends to form first, with a disk of material around it. The material in the disk is in orbit and starts clumping up.
Small clumps sweep through the disk, becoming larger and larger.
The larger a clump gets, the more gravity it has, so it can sweep up more stuff to make the clump larger, which gives it more gravity, and on and on. Meanwhile the center, which has most of the stuff, forms the young sun. The clumps form the planets. When we talk about our solar system, we usually mean the sun and planets. There are so many that we can't count each one, but we can make a good guess.