Stars are giant balls of gas, mostly hydrogen and helium. Stars shine bright by burning hydrogen into helium in their cores.
Most stars have heavier elements like small amounts of carbon, nitrogen, oxygen, and iron. When a star dies it ejects much of its materials back into space. New stars are created with this material. So the material in stars is recycled.