gravity
Stars are born in clouds like the one in the picture. Gravity pulls material together. When it is extremely dense, it begins nuclear fusion. That is, it becomes a star. We can see places where stars are being born right now. Of course, it takes light a long time to travel to us. So what we see right now may have happened many millions or even billions of years ago.