Glycerol, the base molecule of nitroglycerin, in and of itself is a pretty stable molecule, but when nitrated the stable hydroxyl endings of the glycerol turn into nitroxide endings - which are extremely unstable. These endings are right on the borderline of wanting to stay attached and wanting to split off into nitrogen dioxide. The smallest bit of excess energy triggers them to detach. This starts the rest of the molecule into a self-destruct sequence as, in an attempt to stabilize itself, the remaining oxygen molecules through a bond (safety line) to the carbon atoms. This results in the immediate breakdown of the molecule as the carbon atoms are forced to release their other bonds to hang on to the oxygen. This causes a combustion reaction as the carbon and hydrogen use atmospheric oxygen to stabilize themselves. However, it doesn't come out even, there is always an extraneous hydrogen atom which continues the chain reaction by triggering the remaining nitroglycerin molecules to self-destruct. All of this happens in a fraction of a second, causing an enormous explosive force.