Here is a bit more background on what happens before a star becomes a pulsar:
The events leading to the formation of a pulsar begin when the core of a massive star is compressed during a supernova, which collapses into a neutron star. The neutron star retains most of its angular momentum, and since it has only a tiny fraction of its progenitor’s radius (and therefore its moment of inertia is sharply reduced), it is formed with very high rotation speed. A beam of radiation is emitted along the magnetic axis of the pulsar, which spins along with the rotation of the neutron star.
On a related note, some people still do not consider pulsars actual stars although that opinion is becoming less frequent. What do you think? Feel free to comment with your ideas.