Neutron stars are incredible objects. They are the result of the collapse of large stars after those stars have used up their nuclear fuel and can no longer maintain their size due to heat. The core of a star collapses until the pressure forces the electrons and protons together to form neutrons. This happens very quickly. The rest of the star bounces off the surface of this tiny remnant - mere tens of km in diameter - and expands towards a colossal explosion. The explosion comes close to failing, but then happens because during the formation of the neutrons a tiny and almost massless particle - the neutrino - is given off in vast numbers. Neutrinos usually pass through just about anything, but the density of the material that has bounced of the neutron star is so great and the neutrinos so numerous that the incredible explosion of a supernova results.
Neutron stars are stable because the incredible force of gravity is resisted by a quantum-mechanical effect called the Fermi Exclusion Principle which does not allow particles such as neutrons to superimpose. If there is enough mass in a collapsing star and not even that quantum effect can resist gravity, and the result is a black hole.
Or maybe not.
There may be smaller and stranger objects than neutron stars. One of these is called a 'quark star', in which the structure of neutrons is no longer present, but the particles that make up protons and neutrons - quarks - can still resist collapse. Stranger still is an 'Electroweak star': it's known that electromagnetism and the weak force responsible for neutrinos interacting with other particles, and also for some radioactive decays, are different aspects of the same force: the 'electroweak' force. Given enough energy the electroweak force can start to act by converting quarks into leptons (such as electrons). This process gives off lots of energy, so much that it may be able to prevent the collapse of some stars to black holes, at least for a while. For millions of years such strange dense objects may resist the final stage of collapse. But eventually, even these objects will crunch down into the bottomless pit that is a black hole.