The structure of graphs of high chromatic number