Neutron stars are the remains of massive stars and are amongst the densest objects that exist in the Universe. They have approximately the same mass as the Sun (or maybe twice the mass), but that matter is compressed into a ball that measures only 10 km in radius. One teaspoon of the neutron star matter weighs as much as a million elephants !!! Neutron stars emit X-rays as they are very hot.
When a massive star ends its life, it can explode as a supernova. Its outer layers are ejected into Space, leaving only the central nucleus. The nucleus collapses until the density is as extreme as the density in the nucleus of the atom. The protons and the electrons fuse, to create the neutrons that make up the majority of the matter, hence the name "neutron star".
Some neutron stars spin at a huge rate – several times per minute up to 1000 times per second ! They emit a rotating beam of electromagnetic radiation, a bit like the light shining from a lighthouse. If the beam crosses our line of sight on Earth, we see bursts/pulses of light and hence these objects are known as pulsars!