Gunpowder or Black Powder is a chemical compound of Carbon, Sulphur and Saltpetre (pottasium nitrate). The carbon tended to be burnt willow, or to a lesser extent vines, hazel, elder, laurel, and pine cones. When exposed to flame, the powder explodes with great force, producing a cloud of white smoke (which stinks of rotten eggs from the sulphur). Properly harnessed in the barrel of a firearm, gunpowder is an impressive weapon.
If gunpowder gets wet, however, it cannot fire, and is therefore extremely vulnerable to damp weather. Even if the gunpowder is dry, it burns inefficiently, and leaves residue in the barrel of a firearm called fouling. A firearm which has been fouled by a great deal of firing is less accurate, less powerful, and prone to jamming.
Modern "gunpowder" is not gunpowder at all, but a chemical compound called Cordite, which burns very quickly rather than exploding. It is more efficient, produces very little smoke, and is less susceptible to moisture. Burning cordite leaves a distinctive acrid odour which can linger in fabric for days.
The invention of gunpowder is commonly credited to the Chinese or Arabs, but this hard to prove. The Chinese can date it to the 9th century. Early European references to similar substances occur in the 13th century (cf. Roger Bacon's On Marvelous Power of Art and Nature) but the "Corning" process which maintains its composition and quality was not developed until the 15th century.