I DISCUSS in this article the relationship between rotating neutron stars, pulsars and cosmic X-ray sources. The latter may be divided into at least two classes: the sources with large angular diameters, such as the Crab nebula, and those with small angular diameter, such as Sco X-1. I submit that a basic model, consisting of a rotating neutron star losing mass in the presence of a large magnetic field, can account for both types of X-ray source. The extended sources represent the case where the energy in the ``neutron-star wind'' is greater than the magnetic energy. The streaming protons and electrons deposit their energy far out into the nebula in a shock transition region. The relativistic electrons responsible for the extended sources of radio, optical and X-ray emission are produced in the transfer of energy between the protons and electrons in the shock wave, and by magnetic pumping in hydromagnetic waves which are generated by fluctuations in the mass loss rate. The compact sources, such as Sco X-1, represent the other extreme where the magnetic energy dominates, so that no mass loss occurs. The particles are then accelerated and radiate in radiation belts around the neutron star, resulting in a source with a small angular diameter.