Studies of molecular clouds have revealed that star formation usually occurs in a two-step process. First, supersonic flows compress the clouds into dense filaments light-years long, after which gravity collapses the densest material in the filament into cores. In this scenario, massive cores (each more than about 20 solar masses) preferentially form at intersections where filaments cross, producing sites of clustered star formation. The process sounds reasonable and is expected to be efficient, but the observed rate of star formation in dense gas is only a few percent of the rate expected if the material really were freely collapsing. To solve the problem, astronomers have proposed that magnetic fields support the cores against the collapse induced by self-gravity.