Magnetic field gets concentrated by the shrinking. Magnetic fields on the surface of a neutron star can be enormous. Any charged particles outside the star will get swept up by this rotating magnetic field, and be forced to spin around with the star. Just like on the Earth, the particles come in along the magnetic poles of the rotating neutron star. They are accelerating charged particles Accelerating charged particles make electromagnetic waves.
Light comes out of magnetic poles like lights from a lighthouse.
If you are in the way of the beam, you see the beams regularly. So you see pulses periodically. For a new supernova, this would be perhaps 1000 times per second. Particles thrown out by the rapidly rotating core can heat the surrounding region, making it glow. Energy thrown away by rotating neutron star can slow it down, so most pulsars pulse more like once per second instead of one-thousand times per second.