Sub-Riemannian geometries are a generalization of Riemannian geometries. Roughly speaking, in order to measure distances in a sub-Riemannian manifold, one is allowed to only measure distances along curves that are tangent to some subspace of the tangent space. These geometries arise in many areas of pure and applied mathematics (such as algebra, geometry, analysis, mechanics, control theory, mathematical physics, theoretical computer science), as well as in applications (e.g., robotics, vision). This talk introduces sub-Riemannian geometry from the metric viewpoint and focus on a few classical situations in pure mathematics where sub-Riemannian geometries appear. For example, we shall discuss boundaries of rank-one symmetric spaces and asymptotic cones of nilpotent groups. The goal is to present several metric characterizations of sub-Riemannian geometries so to give an explanation of their natural manifestation. We first give a characterization of Carnot groups, which are very special sub-Riemannian geometries. We extend the result to self-similar metric Lie groups (in collaboration with Cowling, Kivioja, Nicolussi Golo, and Ottazzi). We then present some recent results characterizing boundaries of rank-one symmetric spaces (in collaboration with Freeman).