Finding a triple system like this is extremely rare, and the stars have to survive several catastrophic events. First, the massive star goes supernova to create the neutron star that becomes the pulsar without too significantly disturbing the nearby mid-sized stellar companion.
The pulsar and the star then continue to interact with each other with the incredibly dense pulsar pulling material off of the star as it expands and cools into a red giant phase. This acquisition of material is what eventually speeds up the rotation of the pulsar. The outer star will also go through a red giant phase, and all three components are still together after this. Scott Ransom, one of the lead investigators of the project, estimates that this alignment is actually "one in a billion."
ANALYSIS: The Magnetar in Pulsar's Clothing
The pulsar was discovered in a large survey done with the Green Bank Telescope in West Virginia in the summer of 2007. This survey took advantage of the fact that the entire telescope had ceased normal operations in order for the track supporting the massive telescope to be repaired, as it was beginning to buckle under its weight. But astronomers do not waste time, and the telescope scanned vast swaths of the sky looking for pulsars even while the construction was being done.