they initially form from dust and gas - nebula...
the force of gravity makes them come spiralling in, this gains a lot of heat energy...
when temperature gets high enough hydrogen nuclei undergo nuclear fusion - gives out lots of heat light
a star is now born. it is now in a huge stable period ...
what is this stable period?
it is when there is LOADS of hyrogen
and the radiation pushing outwards and the gravitational pull pulling inwards is at equilibrium
this can last for a veryyy long time