A magnetar is a neutron star with a strong magnetic field (1013 to 1015 G). The decay of the field powers emission of X-rays and gamma rays. Star quakes may be triggered by the magnetic field and release a lot of magnetic field energy (magnetar flares, or for large ones, giant magnetar flares), believed to be the engine behind some longer gamma-ray bursts (soft gamma repeaters).
Magnetars have been observed since 1979 and a theory was put forward in 1992. As of 2016, 23 magnetars have been identified.
Magnetars are thought to have fairly short lifetimes, e.g., thousands of years, evolving to neutron stars no longer with the extreme magnetic fields. They are thought to have their strong field on formation, e.g., a core collapse supernova, or as the product of an neutron star merger. Though magnetic field strength grows as fields shrink, this is still thought to be insufficient to create the field strength of a magnetar, and the extra mechanism to do this is a topic of research.
A a millisecond magnetar (MSM) is a magnetar that is also a millisecond pulsar (MSP).