We currently know about 30 magnetars: seemingly isolated neutron stars whose properties can be (in part) comprehended only acknowledging that they are endowed with magnetic fields of complex morphology and exceptional intensity-at least in some components of the field structure. Although magnetars represent only a small percentage of the known isolated neutron stars, there are almost certainly many more of them, since most magnetars were discovered in transitory phases called outbursts, during which they are particularly noticeable. In outburst, in fact, a magnetar can be brighter in X-rays by orders of magnitude and usually emit powerful bursts of hard-X/soft-gamma-ray photons that can be detected almost everywhere in the Galaxy with all-sky monitors such as those on board the Fermi satellite or the Neil Gehrels Swift Observatory. Magnetars command great attention because the large progress that has been made in their understanding is proving fundamental to fathom the whole population of isolated neutron stars, and because, due to their extreme properties, they are relevant for a vast range of different astrophysical topics, from the study of gamma-ray bursts and superluminous supernovae, to ultraluminous X-ray sources, fast radio bursts, and even to sources of gravitational waves. Several excellent reviews with different focuses were published on magnetars in the last few years: among others, Israel and Dall'Osso (2011); Rea and Turolla and Esposito (2013);Mereghetti et al. (2015); Turolla et al.