We have used computer simulation to study the collapse of a hydrophobic chain in water. We find that the mechanism of collapse is much like that of a first-order phase transition. The evaporation of water in the vicinity of the polymer provides the driving force for collapse, and the rate limiting step is the nucleation of a sufficiently large vapor bubble. The study is made possible through the application of transition path sampling and a coarse-grained treatment of liquid water. Relevance of our findings to understanding the folding and assembly of proteins is discussed.