This artist’s image shows how NASA believes most comets were formed in our solar system. Here we see a cloud of dust surrounding a sun-like star. This is what experts believe our solar system looked like when it was born. Dust and gas consolidate around a young star to form planets, moons, asteroids and comets. Particles of dust stick together to form a rock, which collides with other rocks to form comets. (You can watch an animated video of the process here.) According to NASA, comets form so far from their star that any molecules of water, carbon dioxide and methane freeze into the rock particles before they collide to create the comet. Then, as the gravitational pull of the sun pulls the comet closer, the heat vaporizes the gas of the comet in a process called sublimation. The sublimation creates the coma around the rock, which in turn forms the tail.