A review of wind accretion in high-mass X-ray binaries is presented. We focus on different regimes of quasi-spherical accretion onto a neutron star: supersonic (Bondi) accretion, which takes place when the captured matter cools down rapidly and falls supersonically towards the neutron-star magnetosphere, and subsonic (settling) accretion which occurs when the plasma remains hot until it meets the magnetospheric boundary. The two regimes of accretion are separated by a limit in X-ray luminosity at about 4 × 10 36 erg s −1 . In subsonic accretion, which works at lower luminosities, a hot quasi-spherical shell must form around the magnetosphere, and the actual accretion rate onto the neutron star is determined by the ability of the plasma to enter the magnetosphere due to the Rayleigh-Taylor instability. In turn, two regimes of subsonic accretion are possible, depending on the plasma cooling mechanism (Compton or radiative) near the magnetopshere. The transition from the high-luminosity regime with Compton cooling to the low-luminosity (L x 3 × 10 35 erg s −1 ) regime with radiative cooling can be responsible for the onset of the 'off states repeatedly observed in several low-luminosity slowly accreting pulsars, such as Vela X-1, GX 301-2 and 4U 1907+09. The triggering of the transition may be due to a switch in the X-ray beam pattern in response to a change in the optical depth in the accretion column with changing luminosity. We also show that in the settling accretion theory, bright X-ray flares (∼ 10 38 − 10 40 ergs) observed in supergiant fast X-ray transients (SFXT) may be produced by sporadic capture of magnetized stellar-wind plasma. At sufficiently low accretion rates, magnetic reconnection can enhance the magnetospheric plasma entry rate, resulting in copious production of X-ray photons, strong Compton cooling and ultimately in unstable accretion of the entire shell. A bright flare develops on the free-fall time scale in the shell, and the typical energy released in an SFXT bright flare corresponds to the mass of the shell.