We investigate the collapse of a trapped dipolar Bose-Einstein condensate. This is performed by numerical simulations of the Gross-Pitaevskii equation and the novel application of the Thomas-Fermi hydrodynamic equations to collapse. We observe regimes of both global collapse, where the system evolves to a highly elongated or flattened state depending on the sign of the dipolar interaction, and local collapse, which arises due to dynamically unstable phonon modes and leads to a periodic arrangement of density shells, disks or stripes. In the adiabatic regime, where ground states are followed, collapse can occur globally or locally, while in the non-adiabatic regime, where collapse is initiated suddenly, local collapse commonly occurs. We analyse the dependence on the dipolar interactions and trap geometry, the length and time scales for collapse, and relate our findings to recent experiments.