Scientists believe the solar system was formed some 4.6 billion years ago when a cloud of gas and dust collapsed under gravity possibly triggered by a cataclysmic explosion from a nearby massive star or supernova. As this cloud collapsed, it formed a spinning disk with the sun in the center. Since then scientists have been able to establish the formation of the solar system piece by piece.