Any spinning motion in a collapsing gas cloud will result in a vast disk forming around the central protostar (due to conservation of angular momentum).
The central portion forms the star while the disk forms the planets. We see the evidence of disk in the flattened distribution and prograde motion of the planets of the Solar System.
We find examples of such disks around young stars (e.g., Beta Pictoris).
The dust grains in the cloud settle into the central plane of the disk. Because of the higher density, the dust grains collide and begin to stick together. This is the start of an accretion process that builds up larger and larger clumps of solid material. The city-sized rocks that filled the disk are called planetessimals.
The larger planetessimals collide and merge, and eventually accrete all the smaller bodies in the orbital path. The result is a few large, well separated, new planets. The entire process would take 100,000,000 (108) years.