We consider torsional oscillations of magnetars. This problem features rich dynamics due to the strong interaction between the normal modes of a magnetar's crust and a continuum of magnetohydrodynamic (MHD) modes in its fluid core. We study the dynamics using a simple model of a magnetar possessing a uniform magnetic field and a thin spherical crust. First, we show that global torsional modes only exist when one introduces unphysically large dissipative terms into the equations of motion; thus global modes are not helpful for understanding the magnetar quasi-periodic oscillations (QPOs). Secondly, we solve the initial-value problem by simulating the sudden release of an initially strained crust and monitoring the subsequent crustal motion. We find that the crustal torsional modes quickly exchange their energy with the MHD continuum in the core, and decay by several orders of magnitude over the course of ~10 oscillation periods. After the initial rapid decay, the crustal motion is stabilized and several time-varying QPOs are observed. The dynamical spectrum of the simulated crustal motion is in qualitative agreement with that of the X-ray light curve in the tail of a giant magnetar flare. The asymptotic frequencies of some of the QPOs are associated with the special spectral points - the turning points or edges - of the MHD continuum, and are not related to those of the crust. The observed steady low-frequency QPO at 18 Hz is almost certainly associated with the lowest frequency of the MHD continuum, or its first overtone. We also find that drifting QPOs get amplified when they come near the frequencies of the crustal modes. This explains why some of the observed QPOs have frequencies close to the expected crustal frequencies, and why these QPOs are highly variable with time.