This book is about metric spaces of nonpositive curvature in the sense of Busemann, that is, metric spaces whose distance function satisfies a convexity condition. It also contains a systematic introduction to metric geometry, as well as a detailed presentation of some facets of convexity theory that are useful in the study of nonpositive curvature. The concepts and the techniques are illustrated by many examples, in particular from hyperbolic geometry, Hilbert geometry and Teichmüller theory. For the second edition, some corrections and a few additions have been made, and the bibliography has been updated.