You are referring to a nuclear fusion reactor which needs confinement in order to maintain steady operation. But for an explosion, in contrast to a steady source of energy, all you need is to release enough energy per unit time so as to compensate for radiative cooling. If the initial spark ignites the fuel by raising the temperature to a high enough value, then a detonation wave forms and propagates out in a self-sustained fashion. The energy released by the fuel keeps it going and burning more fuel. The detonation front moves out and destroys the original object. The fuel burnt during this process leads to an explosion.
