Gunpowder, also known as black powder to distinguish it from modern smokeless powder, is the earliest known chemical explosive. It consists of a mixture of sulfur (S), charcoal (C), and potassium nitrate (saltpeter, KNO3). The sulfur and charcoal act as fuels while the saltpeter is an oxidizer. Because of its incendiary properties and the amount of heat and gas volume that it generates, gunpowder has been widely used as a propellant in firearms, artillery, rockets, and fireworks, and as a blasting powder in quarrying, mining, and road building.

Gunpowder was invented in 9th-century China and spread throughout most parts of Eurasia by the end of the 13th century.

Gunpowder was widely used to fill fused artillery shells (and used in mining and civil engineering projects) until the second half of the 19th century, when the first high explosives were put into use. Gunpowder is no longer used in modern weapons, nor is it used for industrial purposes, due to its relatively inefficient cost compared to newer alternatives such as dynamite and ammonium nitrate/fuel oil. Today gunpowder firearms are limited primarily to hunting, target shooting, and bulletless historical reenactments.

More Info: en.wikipedia.org