Magnetars are neutron stars with extremely powerful magnetic fields. They are extremely dense objects (the size of mountains but weighing as much as the sun), with magnetic fields hundreds of trillions of times more powerful than the Earth’s. The decay of these powerful magnetic fields powers the emission of very energetic radiation, usually in the form of X-rays or gamma rays.
NASA/Swift/Sonoma State University/A. Simonnet