The solar system was formed approximately 46 billion years ago and consists of the sun, planets, dwarf planets and other astronomical objects bound in its orbit. The formation was caused by the collapse of a giant molecular cloud. 99.86% of the solar systems mass is found in the sun and majority of the remaining 0.14% is contained within the solar systems 8 planets.
There are four smaller inner planets also known as the terrestrial planets, Mercury, Venus, Earth and Mars. These are primarily composed of rock and different metals. The four outer, also known as the gas planets, Jupiter, Saturn, Uranus and Neptune, are substantially larger than the inner planets. Jupiter and Saturn, the two innermost gas giants are the largest of the four and are compressed mainly of hydrogen and helium. Uranus and Neptune, the two outermost gas giants are composed largely of ice, water, ammonia, methane and are sometimes referred to as the ice giants.
There is also other objects to note of in the solar system which are the dwarf planets, (Ceres, Pluto, Haumea, Makemake and Tris) moons, asteroids, the asteroids belt, comets and the Kuiper belt. Many scientists think our solar system was formed from a giant rotating cloud of gas and dust known as the solar nebula. As the nebula collapsed, because of its gravity, it spun faster and flattened into a disk. Most of the materials where pulled towards the centre which formed the sun, other particles within the disk collided and stuck to form asteroid-sized objects known as planetesimals, some of which combined to become the asteroids, comets, moons and planets. The solar wind from the sun was so powerful that it swept away most of the lighter elements such as hydrogen and helium from the innermost planets, leaving behind mostly small, rocky planets. The solar wind was much weaker in the outer regions resulting in gas giants being formed from mostly hydrogen and helium.