A quasi-tree is a geodesic metric space quasi-isometric to a tree. We give a general construction of many actions of groups on quasitrees. The groups we can handle include non-elementary (relatively) hyperbolic groups, CAT (0) groups with rank 1 elements, mapping class groups and Out(F n ). As an application, we show that mapping class groups act on finite products of δ-hyperbolic spaces so that orbit maps are quasi-isometric embeddings. We prove that mapping class groups have finite asymptotic dimension.