Massive stars end their life with a bang, exploding as supernovas and releasing massive amounts of energy and matter. What remains of the star is a small and extremely dense remnant: a neutron star or a black hole.

Neutron stars come in several flavours, depending on properties such as their ages, the strength of the magnetic field concealed beneath their surface, or the presence of other stars nearby. Some of the energetic processes taking place around neutron stars can be explored with X-ray telescopes, like ESA's XMM-Newton.

This image depicts two very different neutron stars that were observed in the same patch of the sky with XMM-Newton. The green and pink bubble dominating the image is Kesteven 79, the remnant of a supernova explosion located about 23,000 light-years away from us.

From the properties of the hot gas in Kesteven 79 and from its size, astronomers estimate that it is between 5000 and 7000 years old. Taking account of the time needed for light to travel to Earth, this means that the supernova that created it must have exploded almost 30,000 years ago. The explosion left behind a a young neutron star with a weak magnetic field, which can be seen as the blue spot at the centre of Kesteven 79.

Beneath it, a blue splotch indicates an entirely different beast: a neutron star boasting an extremely strong magnetic field, known as a magnetar. Astronomers discovered this magnetar, named 3XMM J185246.6+003317, in 2013 by looking at images that had been taken in 2008 and 2009. After the discovery, they looked at previous images of the same patch of the sky, taken before 2008, but did not find any trace of the magnetar. This suggests that the detection corresponded to an outburst of X-rays released by the magnetar, likely caused by a dramatic change in the structure of its magnetic field.

While the neutron star in the supernova remnant is relatively young, the magnetar is likely a million years old; the age difference means that it is very unlikely that the magnetar arose from the explosion that created Kesteven 79, but must have formed much earlier.

This false-colour image is a composite of 15 observations performed between 2004 and 2009 with the EPIC MOS camera on board XMM-Newton. The image combines data collected at energies from 0.3 to 1.2 keV (shown in red), 1.2 to 2 keV (shown in green) and 2 to 7 keV (shown in blue).