Planets are formed from the dust and gas left over after a star is born.

Arrow

This dust and gas come together to form small particles called planetesimals.

Arrow

Planetesimals collide and stick together to form larger bodies called protoplanets.

Arrow

These protoplanets continue to grow by colliding with other protoplanets and planetesimals.

Arrow

Eventually, the protoplanets become large enough to have their own gravity and become planets.

Arrow

 The inner planets, like Earth, are made up of rock and metal because they formed closer to the sun where it was hotter.

Arrow

 The outer planets, like Jupiter, are made up of gas and ice because they formed farther from the sun where it was colder.

Arrow

Some planets, like Earth, have moons that formed from the same process as the planets themselves.

Arrow

The process of planet formation can take millions of years.

Arrow

For more such interesting stuff, click on the link given below