Dynamite is an explosive that is safer than gunpowder, because it doesn't explode by accident quite as easily (but see below). Dynamite was invented by Alfred Nobel of Sweden in the 19th century, and laid the foundation for an enormous fortune, which was the basis for the Nobel Prize. (Nobel had very tight controls over patent, and unlicensed replicas were quickly shut down, although a few American business people got around the patent by using a slightly different formula.)
Prior to dynamite, nitroglycerine, which explodes easily, was commonly used as an explosive, but accidental explosions were a major difficulty, as it is a highly shock sensitive liquid. In dynamite, the nitroglycerine is absorbed by certain types of soil, typically "diatomaceous earth" (which is powdery silica), to form the safely handled dynamite. However, after long term storage, the nitroglycerine sometimes leaks out. This is a serious safety hazard, and has led to a decrease in the popularity of dynamite in recent years.
See also: TNT.