What causes a neutron star to become a pulsar?
It is thought that all neutron stars are pulsars when they are first born, as all spin extremely rapidly and have strong magnetic fields shortly after birth, arising from their dramatic collapse from a few Earth-sized massive star core into a city-sized neutron star. Conservation of angular momentum means that an initially slow-rotating core becomes a rapidly spinning neutron star, which also drives a dynamo action that generates a strong magnetic field.
The emission from a neutron star comes as a result of pair-production in its magnetosphere, which has an approximately dipolar shape and thus the strongest field strength at its poles. This field is rarely aligned with the spin axis, thus giving the "lighthouse" effect where the beam sweeps over an observer at twice the spin frequency. These pair-produced particles radiate energy via synchrotron emission (primarily in the radio), sapping energy from the magnetic field. As the neutron star ages, the magnetic field eventually decays below a critical point where electrons/positrons cannot be pair-produced. This is called the "death line," illustrated here and denoted by the word "graveyard" on a P-P_dot diagram:
After crossing this threshold, the pulsar loses its ability to emit radio waves. Pulsars only remain pulsars for the first ~10^7 years of their lives, and thus about 99% of neutron stars are no longer pulsars.
Additionally, we can only see a pulsar if its beam crosses over the Earth while the pulsar rotates. As the beam angle is usually tens of degrees, the total fraction of pulsars whose beams cross the Earth is approximately 10% the total that exist.
In the lower-left of the diagram you can see very short period pulsars, these are millisecond pulsars and have been spun up by accreting mass from a companion. These pulsars have very long lifetimes, but only represent a small subset of the neutron star population.