Neutron stars are the ultra dense cores of massive stars that run out of fuel, collapse and undergo a supernova explosion. The very central region of the star – the core – collapses, crushing together every proton and electron into a neutron. If the core of the collapsing star is between about 1 and 3 solar masses, these newly-created neutrons can stop the collapse, leaving behind a neutron star. (Stars with higher masses will continue to collapse into stellar-mass black holes.)
This collapse leaves behind the most dense object known – an object with the mass of a sun squished down to the size of a city. These stellar remnants measure about 20 kilometers (12.5 miles) across. One sugar cube of neutron star material would weigh about 1 trillion kilograms (or 1 billion tons) on Earth – about as much as a mountain.
Since neutron stars began their existence as stars, they are found scattered throughout the galaxy in the same places where we find stars. And like stars, they can be found by themselves or in binary systems with a companion.
Many neutron stars are likely undetectable because they simply do not emit enough radiation. However, under certain conditions, they can be easily observed. A handful of neutron stars have been found sitting at the centers of supernova remnants quietly emitting X-rays. More often, though, neutron stars are found spinning wildly with extreme magnetic fields as pulsars or magnetars. In binary systems, some neutron stars can be found accreting materials from their companions, emitting electromagnetic radiation powered by the gravitational energy of the accreting material.
Source: imagine.gsfc.nasa.gov