Crystal structure prediction is the central problem of computational crystallography and materials design. We review two recently proposed methodologies that address this problem: (1) metadynamics-based approach proposed by R. Martoňák, A. Laio and M. Parrinello, Phys. Rev. Lett. 90 075503 (2003) and (2) ab initio evolutionary algorithm USPEX developed by Glass and Oganov in 2004–2006. The two methods are largely complementary. Metadynamics enables studies of phase transformation mechanisms and can predict new crystal structures, but such simulations require a reasonable starting structure and rely on the choice of a relevant order parameter. Evolutionary simulations cannot find phase transformation mechanisms, but can very efficiently find the stable structure without any knowledge of possible crystal structure or order parameters driving phase transitions. We review several cases where these methods produced important new results: prediction of new phases of MgSiO3 in the Earth's lower mantle, elucidation of plastic behaviour of MgSiO3 phases in the Earth's D'' layer, phase transformation mechanisms of SiO2 polymorphs, prediction of new high-pressure phases of CaCO3, elemental sulphur and carbon. Further developments of the two methods are outlined.