Crystallization of supersaturated liquids usually starts by heterogeneous nucleation. Mounting evidence shows\nthat even homogeneous nucleation in simple liquids takes place in two steps; first a dense amorphous\nprecursor forms, and the crystalline phase appears via heterogeneous nucleation in/on the precursor cluster.\nHerein, we review recent results by a simple dynamical density functional theory, the phase-field crystal\nmodel, for (precursor-mediated) homogeneous and heterogeneous nucleation of nanocrystals. It will be\nshown that the mismatch between the lattice constants of the nucleating crystal and the substrate plays a\ndecisive role in determining the contact angle and nucleation barrier, which were found to be non-monotonic\nfunctions of the lattice mismatch. Time dependent studies are essential as investigations based on equilibrium\nproperties often cannot identify the preferred nucleation pathways. Modeling of these phenomena is essential\nfor designing materials on the basis of controlled nucleation and/or nano-patterning.