  Anomalous X-ray Pulsars (AXPs) and Soft Gamma-Ray Repeaters (SGRs) are young
neutron stars (NSs) characterized by high X-ray quiescent luminosities,
outbursts, and, in the case of SGRs, sporadic giant flares. They are believed
to be powered by ultra-strong magnetic fields (hence dubbed magnetars). The
diversity of their observed behaviours is however not understood, and made even
more puzzling by the discovery of magnetar-like bursts from "low-field"
pulsars. Here we perform long-term 2D simulations that follow the evolution of
magnetic stresses in the crust; these, together with recent calculations of the
breaking stress of the neutron star crust, allow us to establish when
starquakes occur. For the first time, we provide a quantitative estimate of the
burst energetics, event rate, and location on the neutron star surface, which
bear a direct relevance for the interpretation of the overall magnetar
phenomenology. Typically, an "SGR-like" object tends to be more active than an
"AXP-like" object or a "high-$B$ radio pulsar", but there is no fundamental
separation among what constitutes the apparent different classes. Among the key
elements that create the variety of observed phenomena, age is more important
than a small variation in magnetic field strength. We find that outbursts can
also be produced in old, lower-field pulsars (B ~ a few x 10^{12} G), but those
events are much less frequent than in young, high-field magnetars.
