Predictive modelling and quantitative understanding of nucleation is essential for predicting phase transformation processes in nature and precisely controlling material synthesis and processing. Atomistic modeling is a powerful tool for capturing the dynamical processes and investigating the underlying mechanism of nucleation, but it faces several key challenges. In the present thesis, we tackled the problem of nucleation by attacking it on several fronts. First of all we employed as well as devised enhanced sampling strategies to make the computation affordable. In the case of homogeneous ice nucleation, we computed the free energy profile associated with a single nucleation pathway, and then accounted for the free energy gain from the possibility of exhibiting stacking disorders in the nucleus. We then formulated a thermodynamic framework to bridge the gap between the microscopic and macroscopic pictures of nucleation, and thus provides a simple and elegant framework to verify and extend classical nucleation theory. Using this framework, we accurately and rigorously extracted different physical quantities that affect nucleation, including the chemical potential, the interfacial free energy, and the Tolman length. By comparing the results that we obtained from simulations of homogeneous nucleation to the ones computed at the planar limit, we verified our thermodynamic framework, as well as benchmarked the accuracy of the classical nucleation theory. Finally, we constructed a machine learning potential based on hybrid DFT data, in order to better model the interatomic interactions in water systems. We predicted the thermodynamic properties of liquid water as well as hexagonal and cubic ice, rigorously taking into account quantum nuclear motion, anharmonic fluctuations and proton disorder. The ab initio description not only leads to structural properties, density isobar, and melting point in excellent agreement with experiments, but also provides insights on how nuclear quantum effects modulate the stabilities of different phases of water. In addition, this ab initio modelling of water opens up many possibilities of future work, including a first principle description of ice nucleation. To sum up, the present thesis provides the key instruments for investigating nucleation using atomistic simulations, and represents a substantial development in the quantitative understanding of the nucleation phenomenon.