The beginning
When a star of sufficient mass (the definition of “”sufficient” here being quite controversial) has exhausted its nuclear fuel, at the core, protons and electrons are squeezed together under the extreme pressure of the weight from the gases on top of them to produce neutrons.
As this happens, the core becomes a tightly packed mass of neutrons and, still under a strong gravitational pull, a cataclysmic explosion follows, known as a supernova.
However, using generally accepted ranges, if the contracting star has a mass of less than 1.4 solar masses, meaning it’s less than 1.4 times the mass of the Sun, then electrons do not collide into their relative protons - the collapse is halted by the outward pressure of degenerate electrons, and the final state is a white dwarf.
But now you might be wandering what the fate of a star more massive than 1.4 solar masses is?
The formation of neutron stars and pulsars
Well, the next range at question, which again, isn’t completely agreed upon by all parties, is 1.4 - 3.2 solar masses…
In the early 1940’s, theorists used quantum mechanics to predict the existence of what we now call neutron stars: when the gravitational “force” becomes too strong, which is due to the increased mass (1.4 - 3.2 SM), the degenerate electrons combine and neutralise with their companion protons, producing neutrons.
As predicted by quantum mechanics, neutrons, much like electrons, obey an exclusion principle, which means that they must occupy a single elementary cell.
When all available cells are full, the neutrons are completely degenerate, and exert an outward pressure capable of resisting gravitational collapse.
In many respects, you could describe a neutron star as an extreme version of a white dwarf.
They’re both small enough in mass to resist becoming a black hole, but neutron stars are smaller than white dwarfs, simply due to the fact that they’ve been compressed more.
In fact, interestingly, if you take a neutron star with the same mass as our sun, its radius would be a tiny 15 kilometres… which is incredibly small when we are comparing that to the radius of the Sun which is about 696,000 kilometres.
Importantly though, the neutron star would have an incredibly high density of around 1 billion tonnes per cubic centre meter! That size and density creates some magnificent features which we’ll discuss now, specifically around their rotational velocity and magnetic fields.
Characteristics - how is a pulsar different from a neutron star?
Firstly, the rotational velocity of a neutron star his much greater than that of an average star, or white dwarf, completing many rotations every second.
To understand why this is the case, it might be helpful to compare this to how an ice skater would bring their arms in by their side when wanting to rotate at their quickest.
Secondly, because they’re extremely small, they have incredibly strong magnetic fields.
The solid core and moving liquid mantel of a neutron star, like every other star, and most planets even, creates a magnetic field.
However, as stars collapse, their magnetic field strength increases, due to it being concentrated over a smaller surface area. In fact, neutron stars typically have a magnetic field strength of 1 trillion Gauss, where 1 Gauss is the magnetic field strength of the Earth!
These 2 properties result in the neutron star emitting high energy beams of concentrated radiation, usually in the form of radio waves, but there can be other types such as Gamma, from the poles of the star.
If the neutron star is pointed so that, throughout rotation, the beams align with the Earth so that we can detect these beams in blips as the neutron star rotates, then we call them pulsars, simply because as move in and out of their firing line (because they're rotating), the beams of light appear to "pulse".
If they never align with us at all, then we simply leave them at neutron stars…. so all pulsars are neutron stars, but not all neutron stars are pulsars!

Something to bear in mind...
Just to add before we wrap up, something that's important to remember about neutron stars is that they do not undergo nuclear fusion, with only 1 exception.
Since they're made almost entirely of degenerate neutrons, there's nothing for them to fuse.
The reason why they shine so brightly for extremely long lengths of time is that they're incredibly hot, with core temperatures upon birth of around 500 billion degrees Kelvin!
I say upon birth, because at this temperature, neutrinos (not to be confused with neutrons) are rapidly ejected from the surface, carrying large amounts of energy with them. After around 1 year into a neutron star's existence, the temperature can drop to around 1 million degrees Kelvin, and slowly continues to drop further over millions of years.
I mentioned an exception here, that is if the neutron star is in a binary system with a closely orbiting star, then its strong gravitational field can cause the neutron star to pull gases away from the orbiting star, resulting in small amounts of nuclear fusion on the surface of the neutron star.
I think that’s about it for neutron stars and pulsars….
In summary, they’re extremely small, dense, rapidly rotating bodies that are made up almost completely of degenerate neutrons (about 10% protons) and are the remnants of a collapsing of a star roughly 1.4 - 3.2 times the mass of the Sun.
But hopefully the "Why’s and How’s" are also interesting to know (and the odd mind-blowing fact thrown in here and there)!
Speaking of.... did you know that neutron stars are so dense in fact, that if you were to somehow take a teaspoon of one, it would weigh about 100 million tonnes!
Thanks for reading, and consider checking out some of our other articles here at Expansive if you found any of this interesting!