Therefore, we can identify elements in a gas by studying the identifying characteristic wavelengths of light absorbed or emitted in the light from a celestial object. The pulses from a pulsar are emitted many times per second. For this to be possible the object producing the pulses must be small. If a white dwarf was rotating that rapidly, it would fly apart. So the object has to be smaller than a white dwarf.
Neutron stars are small and can spin rapidly without being torn apart.
The model for a pulsar has a rapidly rotating neutron star with a strong magnetic field that is not aligned with the rotation axis. The rotating magnetic field accelerates electrons that beam radiation out through the magnetic poles of the neutron star, almost like a lighthouse. Each time the beam sweeps past our line of sight we see a pulse of radiation. If the Sun suddenly became a black hole the Earth's orbit would not change. The gravitational affects far from a black hole are the same as those of any object with the same mass.