Neutron stars can be observed in the cosmos as pulsars. These are rapidly rotating neutron stars that send out beams of powerful electromagnetic energy. This appears as a “pulse” due to their rotation, hence the name.
This energy comes from their magnetic fields. A normal star possesses a strong magnetic field. As it collapses, the magnetic field strength, B, increases inversely proportional to the radius squared. As neutron stars have a tiny radius indeed, B can be phenomenally large, say 108 tesla. The magnetic field can exist, despite the superconducting protons (which are diamagnetic) because there is still a normal (though degenerate) electron gas nearer the surface.
The very rapid rotation of the neutron stars, which can have periods of 1 ms, is due to conservation of angular momentum. As the star rotates, it accelerates charged particle in its vicinity, and these emit radiation. This radiation can range from the visual to the x-ray bands, although usually, radio frequencies are detected. Of course the actual process is much more complicated than this.