Formation of the Solar System:
Different models have been proposed throughout time to explain the formation of the Solar System. The most widely accepted model today is a nebular model. In this model, a cloud of insterstellar gas and dust contracted to form the sun and planets. This model most closely agrees with observations made of the solar system.
The nebular model says that the sun and planets formed from a flattened cloud of interstellar material. Clouds of interstellar material have been observed throughout the universe. These clouds spin, causing them to flatten along their rotational axis. This accounts for the planets forming in the same plane. Gravity also causes the cloud to collapse. During this process, the center contracts into a ball of hot gas and dust. This will become the sun; in this stage it is called a protosun.
The next process is accretion, which results in planet formation. First, the gases outside of the sun condense into solid materials. These particles collide forming larger particles called planetesimals, which in turn collide and form protoplanets. These protoplanets then become planets. The composition of the planets is a result of the order of the solid materials that formed from the gases outside of the sun. The jovian planets are large, with high gravitational fields, so they accumulated much of the Hydrogen and Helium.