the force of gravity pulls the dust and gas together to form a protostar. the temperature rises as the star gets denser and more particles collide with each other. then the temperature gets high enough, hydrogen nuclei undergo nuclear fusion to form helium nuclei. this gives out huge amounts of energy, which keeps the core of the protostar hot. a star is born