Crystal defects in diamond have emerged as unique objects for a variety of applications, both because they are very stable and because they have interesting optical properties. Embedded in nanocrystals, they can serve, for example, as robust single-photon sources or as fluorescent biomarkers of unlimited photostability and low cytotoxicity. The most fascinating aspect, however, is the ability of some crystal defects, most prominently the nitrogen-vacancy (NV) center, to locally detect and measure a number of physical quantities, such as magnetic and electric fields. This metrology capacity is based on the quantum mechanical interactions of the defect's spin state. In this review, we introduce the new and rapidly evolving field of nanoscale sensing based on single NV centers in diamond. We give a concise overview of the basic properties of diamond, from synthesis to electronic and magnetic properties of embedded NV centers. We describe in detail how single NV centers can be harnessed for nanoscale sensing, including the physical quantities that may be detected, expected sensitivities, and the most common measurement protocols. We conclude by highlighting a number of the diverse and exciting applications that may be enabled by these novel sensors, ranging from measurements of ion concentrations and membrane potentials to nanoscale thermometry and single-spin nuclear magnetic resonance.