The problem of understanding how a coherent, macroscopic Bose-Einstein condensate (BEC) emerges from the cooling of a thermal Bose gas has attracted significant theoretical and experimental interest over several decades. The pioneering achievement of BEC in weakly-interacting dilute atomic gases in 1995 was followed by a number of experimental studies examining the growth of the BEC number, as well as the development of its coherence. More recently there has been interest in connecting such experiments to universal aspects of nonequilibrium phase transitions, in terms of both static and dynamical critical exponents. Here, the spontaneous formation of topological structures such as vortices and solitons in quenched cold-atom experiments has enabled the verification of the Kibble-Zurek mechanism predicting the density of topological defects in continuous phase transitions, first proposed in the context of the evolution of the early universe. This chapter reviews progress in the understanding of BEC formation, and discusses open questions and future research directions in the dynamics of phase transitions in quantum gases.