We study the origin of X-ray emission from OB stars due to collisions of stellar winds and/or inhomogeneities in the winds. The low-resolution X-ray spectra of a big sample of OB stars were fitted by both the stationary APEC/MEKAL models and by this model with an additional PSHOCK component describing the nonstationary X-ray emission. These spectra were also described by two-temperature PSHOCK models. More than ∼50% of considered spectra can be described by the above-mentioned model combinations including the PSHOCK model and the quality of the fits appears to be better for O stars. The plasma temperature of the PSHOCK component is about 1–5 keV with the ionization timescale τ u ∼ 108–1013 s cm−3. The temperature of the PSHOCK component increases with the momentum and kinetic energy of the stellar wind by a power law with an index ∼0.12–0.14. Such dependencies were not revealed through modeling by the stationary APEC/MEKAL models only. At the same time the X-ray luminosity of OB stars depends on momentum and kinetic energy of their winds similarly either for stationary or for nonstationary models. We conclude that many O stars and some B stars can be sources of the nonstationary X-rays formed in their inhomogeneous stellar wind.