When a massive star exhausts its fuel, its core collapses under gravity in milliseconds, releasing more energy than the Sun will emit in its entire lifetime. What remains is a neutron star: roughly 1.4 solar masses compressed into a sphere about 20km across, so dense that a teaspoon of its material would weigh a billion tonnes.
Pulsars are neutron stars whose magnetic axis is tilted relative to their rotation axis. This misalignment flings two tight beams of radio waves around like a lighthouse. From Earth, we catch a pulse each time a beam sweeps past, with some arriving with clockwork regularity accurate to nanoseconds, with accuracy that can be compared to atomic clocks!.
Millisecond pulsars are thought to be old pulsars recycled by a binary companion, matter from the companion spins them back up to hundreds of rotations per second, like a spinning top given a fresh flick.
Despite being remnants of violent stellar death, pulsars are extraordinarily stable. The most precise millisecond pulsars lose less than a microsecond per year, making them some of the most accurate natural clocks in the universe. Astronomers use networks of them as a galactic-scale gravitational wave detector, watching for correlated timing shifts caused by ripples in spacetime passing through the galaxy.
The first pulsar was discovered in 1967 by PhD student Jocelyn Bell Burnell, though the Nobel Prize for the discovery was awarded to her supervisor. The signal was so unnervingly regular that her team briefly logged it as LGM-1 (Little Green Men) before the natural explanation became clear.