The dynamics of structural collapse