This book deals with Riemannian manifolds for which the nullity space of the curvature tensor has codimension two. These manifolds are "semi-symmetric spaces foliated by Euclidean leaves of codimension two" in the sense of Z I Szabo. The authors concentrate on the rich geometrical structure and explicit descriptions of these remarkable spaces. Also parallel theories are developed for manifolds of "relative conullity two". This makes a bridge to a survey on curvature homogeneous spaces introduced by I M Singer. As an application of the main topic, interesting hypersurfaces with type number two in Euclidean space are discovered, namely those which are locally rigid or "almost rigid". The unifying method is solving explicitly particular systems of nonlinear PDE.