If you read any acount of the formation of the solar system, you will learn that its planets were formed out of a disc of gas and dust that remained after the formation of the sun. In this disc, with the sun at its centre, dust particles became larger in size by ‘accreting’ other such particles. Over a period of time, lumps of matter formed in the disc collapsed inwards under their own gravity to eventually give rise to planets. The only problem with this hypothesis was that any attempt to computationally model the process ended up with the planet plunging into the sun. Going by these models, the planets and hence the earth had no business existing at all, but clearly since they do, scientists had concluded that there was something vital missing in their description of the process.
Now researchers at the University of Cambridge and American Museum of Natural History have run new simulations that do end up resulting in the formation of planets in stable orbits around the sun. The crucial difference in the new simulations is that the researchers assumed temperature variations in the gas and dust disc. Earlier models had assumed that the disc would radiate extra energy to surrounding space very quickly and it was possible to assume a uniform temperature in the disc. It turns out that the collection of gas and dust does not behave in this ideal manner, and that variations in temperature are crucial to the formation of stable planets.
The simulations give a vivid picture of the formation of planets. As the protoplanets accumulate more and more mass, their movement within the disk is constrained by the temperature differences in the disk. As a result, the planets get trapped into orbits that slowly move inwards as the disk dissipates. The planets are then eventually dropped into orbits whose radius depends on their mass.