Fireworks are classified as a low explosive pyrotechnic and used for aesthetic, historical, religious, and entertainment purposes. They were originally invented in China during the Song Dynasty (960–1279) and were thought to scare away evil spirits. The first of which is predominantly thought to be the predecessor of the firecracker, which was was a type of heated bamboo, used as early as 200 BC, that exploded when heated continuously. After the invention of gunpowder, gunpowder firecrackers had a shape that resembled bamboo and produced a similar sound, so the name “exploding bamboo” was retained.
Consumer pyrotechnics (fireworks available at the common fireworks stand being the primary example) are devices readily available for purchase by the public, usually with no special licensing or training. These items are generally considered low hazard pyrotechnic devices but, like all pyrotechnics, can still be hazardous and should be stored, handled and used appropriately.
Explosions, flashes, smoke, flames, fireworks or other pyrotechnic driven effects used in the entertainment industry are referred to as proximate pyrotechnics. In most jurisdictions, special training and licensing must be obtained from local authorities to legally prepare and use such.
The National Fire Protection Association would like to remind everyone that consumer grade fireworks can be dangerous on a variety of matters. You can download their Fireworks Safety Tips here.
How to Photograph Fireworks. A great tutorial here on the best ways to photograph fireworks by the New York Institute of Photography.