Mechanical metamaterials exhibit properties and functionalities that cannot be realized in conventional materials. Originally, the field focused on achieving unusual (zero or negative) values for familiar mechanical parameters, such as density, Poisson's ratio or compressibility, but more recently, new classes of metamaterials — including shape-morphing, topological and nonlinear metamaterials — have emerged. These materials exhibit exotic functionalities, such as pattern and shape transformations in response to mechanical forces, unidirectional guiding of motion and waves, and reprogrammable stiffness or dissipation. In this Review, we identify the design principles leading to these properties and discuss, in particular, linear and mechanism-based metamaterials (such as origami-based and kirigami-based metamaterials), metamaterials harnessing instabilities and frustration, and topological metamaterials. We conclude by outlining future challenges for the design, creation and conceptualization of advanced mechanical metamaterials.