The Sun took 30 million years to do this, an O star takes about 160,000 years, and an M star takes about 1 billion years. As a cloud rotates it spins out into a disk. This is how the planets were formed. A second feature of the rotation is that it apparently leads to jets of material being blown out from the poles of the spinning protostar. We don't know exactly how these work, but the best theory has that magnetic fields in the disk surrounding the new star focus matter into the jets.
Many stars are members of clusters of hundreds or thousands of stars.
Clusters, generally, come in two types a globular cluster and an open cluster . Astronomers assume that when you see a cluster of stars they were all formed at the same time. Stars ought to form in groups, since large interstellar clouds are more unstable than small ones. It is theoretically very unlikely for hundreds of stars to come together to form a new cluster unless they were born that way. The HR diagrams of clusters indicate that they have a definite age.