Stars can range in mass from about 8% of the mass of the Sum to 200 to 300 times the mass of the Sun.
For masses below 8% of the mass of the Sun, about 80 times the mass of Jupiter, the core never gets hot enough for nuclear reactions to start. The only source of heat is due to gravity contraction and friction. These stars are called brown dwarves. These are probably the most numerous types of star.
Above 50% the mass of the Sun, colours other than red are produced. The least massive stars are orange and as the mass increases the colour changes through yellow, white then blue. Our own Sun is about the least massive example you can have of a white star.
Low mass stars are the longest lived, but they are very dim. As the mass of the star increases the luminosity of the star increases dramatically. The upper limit for the is governed by the rate at which stars burn up energy. You might imagine that the biggest stars live the longest because they have the most fuel to burn. In fact it is the rate at which stars burn their fuel that is dominant. Doubling the mass may mean the rate at which nuclear reactions take place increase by a factor of 30. The lifetime of the star may fall by a factor of 10.
A good example of a giant star is the blue hypergiant Eta Carinae, located about 8,000 light-years away. Eta Carinae is thought to have 150 times the mass of the Sun and produces out 4 million times as much energy. It’s probably less than 3 million years old, and astronomers guess that it will detonate as a supernova within 100,000 years. Ultimately a star may be so bright at formation that the energy produce puts an end to the contraction of the gas cloud around it and maybe disperses it When the star explodes as a supernova within a million or so years, any remaining cloud will be blasted into space to become part of the interstellar medium.
It is the short lives of the hottest stars that makes life possible. Massive stars with short lives explode and distribute heavy elements – including all those elements necessary for life – carbon, oxygen etc – throughout the universe. Later generations of stars form, and around them, maybe planets with these essential ingredients of life.