Nebulas are vast – even millions of light years in diameter – interstellar clouds of dust, hydrogen, helium and other ionized gases. The formations of gas, dust, and other materials eventually “clump” together to form denser regions, which attract further matter, and eventually will become dense enough to form stars. The remaining material is then believed to form planets and other planetary system objects.
“A cloud that veils one of nature’s secret places. This is a stellar nursery, a place where stars are born. They condense by gravity from gas and dust until their temperatures become so high that they begin to shine. Such clouds mark the births of stars as others bear witness to their deaths.”
– Carl Sagan, Cosmos: A Personal Voyage Episode 1: The Shores of the Cosmic Ocean