a length space
Think about the distance between two cities. On a flat map you could draw a straight line and read off the as-the-crow-flies distance, but if you actually have to walk it, what matters is the length of the shortest road that stays on the ground. A length space is a metric space where distance is defined the second way: the distance between two points is the infimum of the lengths of all paths joining them. The metric is built from travel along curves, not imposed from outside.
Precisely, start with a metric space (X, d). Any continuous path gamma: [0,1] -> X has a length L(gamma), defined as the supremum over all partitions 0 = t_0 < t_1 < ... < t_n = 1 of the sum of d(gamma(t_{i-1}), gamma(t_i)) — you approximate the curve by inscribed broken lines and take the limit of their total lengths. Now define a new distance d_L(x, y) = inf { L(gamma) : gamma joins x to y }. This d_L is the intrinsic, or length, metric. The space (X, d) is called a length space when d already equals d_L, i.e. distance is recovered by minimizing path length. A useful equivalent test: for every x, y and every epsilon > 0 there is a midpoint m with d(x, m) and d(m, y) both at most d(x,y)/2 + epsilon.
Length spaces are the natural setting in which geometry survives without any smoothness, coordinates, or differential structure — graphs, the surface of a cube, fractals, and limits of manifolds can all be treated on equal footing. The contrast to keep in mind: the plane with its usual straight-line metric is a length space, but the same plane with one point removed is not, because two points on opposite sides of the hole have no path achieving their straight-line distance, so the intrinsic metric is strictly larger than the chord metric. Passing from d to d_L is the standard way to repair such a space, but it can increase distances and even produce points at infinite distance.
Take the unit circle S^1 sitting in the plane R^2. As a subset of the plane with the straight-line (chord) metric, the distance between two diametrically opposite points is 2. But the circle is naturally a length space if we measure along the circle: then opposite points are at distance pi, the arc length of a half-circle. The chord metric is not a length metric here; the intrinsic metric d_L it induces is the arc-length metric, and the two genuinely differ.
Chord distance 2 versus intrinsic (arc-length) distance pi for antipodal points on the circle.
A length space need not be geodesic: the infimum of path lengths may not be attained. The open punctured disc minus its center is a length space, yet some pairs have no shortest path — you can get arbitrarily close to going through the hole but never do.