  X-ray pulsars shine thanks to the conversion of the gravitational energy of
accreted material to X-ray radiation. The accretion rate is modulated by
geometrical and hydrodynamical effects in the stellar wind of the pulsar
companions and/or by instabilities in accretion discs. Wind driven flows are
highly unstable close to neutron stars and responsible for X-ray variability by
factors $10^3$ on time scale of hours. Disk driven flows feature slower state
transitions and quasi periodic oscillations related to orbital motion and
precession or resonance. On shorter time scales, and closer to the surface of
the neutron star, X-ray variability is dominated by the interactions of the
accreting flow with the spinning magnetosphere. When the pulsar magnetic field
is large, the flow is confined in a relatively narrow accretion column, whose
geometrical properties drive the observed X-ray emission. In low magnetized
systems, an increasing accretion rate allows the ignition of powerful explosive
thermonuclear burning at the neutron star surface. Transitions from rotation-
to accretion-powered activity has been observed in rare cases and proved the
link between these classes of pulsars.
