A pulsar (purple) is a rapidly spinning neutron star that beams electromagnetic radiation out along its magnetic axis. The beam (white) is framed by the magnetic field lines (gold) emanating from the neutron star. Because the beam is tilted slightly from the rotation axis (magenta), it revolves as the pulsar spins. Like a light-house beacon, if the magnetic axis happens to point in the general direction of the Earth, we may see a "pulse" of radiation across the spectrum, from radio waves to visible light to gamma rays.
A neutron star is the collapsed core of a massive star. At the end of the star's life the fires of nuclear fusion in its center run out of fuel, leaving only an ash of iron. The tremendous pressure of the rest of the star will then squeeze the iron's protons and electrons together into neutrons. A wave of neutrinos is also emitted, which helps blast the rest of the star away in an incredible explosion called a supernova.
Supernova 1987A in the Large Magellenic Cloud
Left behind is a neutron star about 10 Km in diameter (the violet sphere). Though extremely hot, this star is so small that it can only be observed from the Earth with difficulty, if at all.
The Crab Pulsar in the constellation Taurus
Like a spinning ice skater who pulls in their arms to increase their speed, the original star's slow rotation dramatically increases to many times a second for the neutron star. The original star's magnetic field also remains, at a small angle to the rotation axis and intensified by the neutron star's compact size (indicated by the gold loops). As in an electric power plant, a rotating magnetic field produces an electric field, which accelerates protons and electrons near the neutron star's surface to generate an intense beam of electromagnetic radiation along the magnetic axis (the white cones).
To compensate for this loss of energy, the pulsar slows down over time. The first pulsar was observed by radio telescopes in 1967, rotating once every 1.3 seconds. The association of pulsars with supernovae was understood after the 1968 discovery of the 30-times-a-second pulsar at the center of the Crab Nebula. This nebula is the remnant of a supernova 6500 light years away, observed on Earth in the year 1054.
The Crab Nebula in the constellation Taurus