Within collapsing protogalaxies, thermal instability leads to the formation of a population of cool fragments which are confined by the pressure of a residual hot background medium. The critical mass required for the cold clouds to become gravitationally unstable and to form stars is determined by both their internal temperature and external pressure. Massive first generation stars form in primordial clouds with sufficient column density to shield themselves from external UV photons emitted by nearby massive stars or AGNs. Less massive photoionized clouds gain mass as they undergo cohesive collisions with each other, and lose mass due to ram pressure stripping by the residual halo gas. Collisions may also trigger thermal instability and fragmentation into cloudlets. While most cloudlets have substellar masses, the largest become self-gravitating and collapse to form protostellar cores without further fragmentation. The initial stellar mass function is established as these cores capture additional residual cloudlets. Energy dissipation from the mergers ensures that the cluster remains bound in the limit of low star formation efficiency. Dissipation also promotes the formation and retention of the most massive stars in the cluster center. On the scale of the protogalactic clouds, the formation of massive stars generates intense UV radiation which photoionizes gas and quenches star formation in nearby regions. As gas density accumulates in the center of the the galactic potential, the self regulated star formation rate increases. At the location where most of the residual gas can be converted into stars on its internal dynamical timescale, a galaxy attains its asymptotic kinematic structure such as exponential profiles, Tully-Fisher, and Faber-Jackson laws.