1) Stars form from dense fragments within interstellar clouds that collapse under gravity over millions of years.
2) Protostars form within the collapsing fragments and grow in mass through accretion until their cores reach temperatures high enough for nuclear fusion.
3) After 10 million years, the protostar becomes a true star on the main sequence, where nuclear fusion powers the star for its lifetime.