A magnetar is a type of star that has a very strong magnetic field. Magnetars are different from other stars because their magnetic fields are so powerful. Think of a magnetar like a giant magnet in the sky - it pulls and pushes on other objects in space and gives off energy like light and X-rays. Scientists believe that a magnetar can be formed by the collapse of a very massive star.