Dynamite is one example of a chemical explosive. An explosive is anything that, once ignited, burns extremely rapidly and produces a large amount of hot gas in the process. The hot gas expands very rapidly and applies pressure. Other explosives that you commonly hear about are nitroglycerin and TNT, but anything from gasoline to ammonium nitrate fertilizer to special plastic explosives are in the same class.Building Implosion Image Gallery
Most true explosives contain the oxygen they need for burning in the chemical. This allows burning to occur much more quickly. Nitroglycerin, for example, has the chemical formula C3H5(ONO2)3. The carbon and hydrogen combine with oxygen, and the nitrogen is liberated.
Dynamite is simply some sort of absorbent material (like sawdust) soaked in nitroglycerin. The absorbent material makes the nitroglycerin much more stable. You normally use a blasting cap to detonate dynamite -- a blasting cap creates a small explosion that triggers the larger explosion in the dynamite itself.