The origins of autoignition at hot spots are analysed and the pressure pulses that arise from them are related to knock in gasoline engines and to developing detonations in ducts. In controlled autoignition engines, autoignition is benign with little knock. There are several modes of autoignition and the existence of an operational peninsula, within which detonations can develop at a hot spot, helps to explain the performance of various engines. Earlier studies by Urtiew and Oppenheim of the development of autoignitions and detonations ahead of a deflagration in ducts are interpreted further, using a simple one-dimensional theory of the generation of shock waves ahead of a turbulent flame. The theory is able to indicate entry into the domain of autoignition in an 'explosion in the explosion'. Importantly, it shows the influence of the turbulent burning velocity, and particularly its maximum attainable value, upon autoignition. This value is governed by localized flame extinctions for both turbulent and laminar flames. The theory cannot show any details of the transition to a detonation, but regimes of eventually stable or unstable detonations can be identified on the operational peninsula. Both regimes exhibit transverse waves, triple points and a cellular structure. In the case of unstable detonations, transverse waves are essential to the continuing propagation. For hazard assessment, more needs to be known about the survival, or otherwise, of detonations that emerge from a duct into the same mixture at atmospheric pressure.