Geometry and combinatorics of cube complexes