I will add to that info by defining detonation, which few understand, and which is often a mis-used term. Detonation is the propagation of a chemical reaction within a medium at the speed of sound within that medium. Essentially, it is triggered by a shock wave or a highly compressed front which travels through the medium. In the case of a fuel-air mixture, the compression wave raises the temperature to the auto-ignition temperature, thus ignition occurs as the compression wave travels through the medium. In the case of true explosives such as dynamite or TNT, the shock wave alone is enough to trigger the decomposition of the explosive. By contrast, gunpowder does not detonate; it just burns quickly. If it detonated, it would destroy the gun barrel.