We study the large scale geometry of mapping class groups MCG(S), using hyperbolicity properties of curve complexes. We show that any self quasi-isometry of MCG(S) (outside a few sporadic cases) is a bounded distance away from a left-multiplication, and as a consequence obtain quasi-isometric rigidity for MCG(S), namely that groups quasi-isometric to MCG(S) are virtually equal to it. (The latter theorem was proved by Hamenstadt using different methods). As part of our approach we obtain several other structural results: a description of the tree-graded structure on the asymptotic cone of MCG(S); a characterization of the image of the curve-complex projection map from MCG(S) to the product of the curve complexes of essential subsurfaces of S; and a construction of Sigma-hulls in MCG(S), an analogue of convex hulls.