A blasting cap is a small, easily-ignited explosive charge. Blasting caps are used as detonators for more powerful charges of explosives like TNT or ANFO, which are formulated to be more stable (and thus safer to transport) but require greater energy to ignite.
Blasting caps were invented in 1863 by Alfred Nobel (the originator of the Nobel prize), as detonators for his newly-patented "blasting oil," a mixture of black gunpowder and nitroglycerine. The initial design was simply a wooden plug filled with black powder, but Nobel quickly came up with an improved version - a metal cap filled with fulminate of mercury that required only a shock or mild heat to detonate.
Modern blasting caps come in a great many varieties, and are typically electrically-fired via a standard detonator. They are used in almost every blasting application - mining, demolition, and engineering.
There is also a thriving collectibles trade in old blasting cap tins.