There are two types of explosives. Low explosives and high explosives.
Gun powder, in a bullet cartridge, creates a relatively slow reaction and low pressure. It is considered a low explosive. It's the expanding gas that discharges the object from the gun barrel. This reaction is caused by rapid combustion or decomposition of explosive materials and transmits a pressure wave that is subsonic in nature. This slower explosive reaction is defined by Science / how stuff works, as deflagration.
In high explosives the pressure wave produced can be as high as 500,000 times that of Earth's atmosphere. This is because high explosives do not burn - they "detonate." The explosive material decomposes almost instantaneously or in about 1 millionth of a second. This creates intense heat up to about 5,500 Kelvin. The shock wave, which can be deadly by itself, becomes supersonic and can produce a velocity up to 9000 meters per second. Science / how stuff works, defines detonation.
High explosives are classified into two types. Primary explosives and Secondary explosives.
Primary explosives are very sensitive. Any kind of impact or friction can set them off. Static electricity or heat can cause a primary explosive to become unstable in an instant. A good example of this type of explosive is nitroglycerin.
Secondary explosives are very stable and do not react to shock or friction. This makes them easier to work with and much safer. These explosives can be used to ignite primary explosives for ease of calculation and control.
There are three basic types of Secondary explosives.
Dynamite uses sawdust or diatomaceous earth as an absorbent and nitroglycerin as the agent. It is the most commonly known high explosive. Formed into "sticks," dynamite uses a fuse and a blasting cap to detonate. Dynamite has been widely used in warfare. "My dynamite will sooner lead to peace than a thousand world conventions. As soon as men will find that in one instant, whole armies can be utterly destroyed, they surely will abide by golden peace." Alfred Nobel, by Resources.
Trinitrotoluene or TNT, is a yellow colored chemical compound. It is toxic and can cause skin irritation. It was originally invented to be a yellow dye. Easy to work with, it can be poured into holes and is water-resistant making it a natural for wet applications.
Tovex is a water based gel explosive that has basically replaced dynamite. It is much safer to use and manufacture. It's low toxicity has made it attractive to the world market and is used by about 80% of the oil industry. This explosive is the only one that has never been used in warfare.
There are many beneficial uses for high explosives in the civilized world. The building of tunnels, roads or just demolition. It is up to society to make sure that these dangerous explosives are used peacefully.