How do stars form and how can they die?
Stars form in regions with dense concentrations of gas and dust in interstellar space. Their deaths depend on their respective masses.
If the star has a less mass than the Sun, it lives for trillions of years and slowly dies out, becoming a black dwarf.
If the star has about the same or a bit more mass than the Sun then it becomes a white dwarf after 10-15 billion years of its formation.
If the star is larger than 10 solar masses, it may become either a neutron star or its core might collapse to form a black hole if the mass of the star exceeds 18 or more Solar Masses