A nebula is a huge cloud of gas and dust that is drifting in space. Composed of hydrogen and helium gas, these clouds also contain trace amounts of heavier elements like oxygen and carbon. Nebulae can also serve as nurseries for new stars, where the force of gravity causes gas and dust to come together to form a new star. They can also form out of the aftermath of a dying star, a supernova.