Approximately 4.6 billion years ago, the solar system was a cloud of dust and gas known as a solar nebula. Gravity collapsed the material in on itself as it began to spin, forming the sun in the center of the nebula. ... Small particles drew together, bound by the force of gravity, into larger particles.