Big bang site reports that our solar system is composed of an average sized star (Sun) and 8 planets. There are two kinds of planets: Inner planets and outer planets. Four of the inner planets which are closer to the sun are Mercury, Venus, Earth, and Mars. These are smaller planets in comparison to the outer ones, mostly made up of rocks.
The outer planets are: Jupiter, Saturn, Uranus and Neptune and their main containing substance is Gas.
About 5 billion years ago, there was a giant cloud in one of the spiral arms of Milky Way which is called Nebula clouds. It was made of dust and gas (mainly Helium and Hydrogen and other heavy gasses in smaller proportions.)
The Substances of Nebula cloud which hadn’t been absorbed by the sun, formed into a flat disk of dust and gas and rotated around the sun under the influence of gravity. This was the beginning point of planet’s formation.
The elements of that disk became compressed during a long time. Atoms and Molecules started to stick together and some of them made objects to the size of a ball.
When those heavenly bodies crash at high speeds, they became smaller particles, but sometimes they collided at slower speeds so they turned into bigger bodies.
Scientists call those bodies a planet which their mass is so high that it’s enough to spin it.
In 2007, researchers at the University of California Davis determined that our solar system was formed about 4568 billion years ago. They did that by determining the life length of stones on asteroid belt.
The sun spreads a lot of energy and particles into the space called Solar winds. These winds are so strong that they have driven most of the gases away from the sun so that four closer planets to the sun are made up of rocks and metals only.