Stars form from large clouds of dust and gas called nebulae that collect into spinning balls. Gravity causes the gas and dust to condense, forming a hot core that develops into a star. Stars are made primarily of hydrogen and helium. When these gases run out, the star dies - older stars may explode, forming new dust that can lead to the formation of new stars.