A firework is classified as a low explosive pyrotechnic device used primarily for aesthetic and entertainment purposes. The most common use of a firework is as part of a fireworks display.
It's great fun standing about 20 foot from where they're actually going off. The fireworks look nothing at all like the ones you buy in shops. Just large cardboard tubes stuck together at crazy angles with gaffer tape or such like. Most of the big spectacular bursts are not rockets with sticks as in your garden display. Instead they use mortars, and the shells are fired up as sort of round cardboard things which ignite up in the air and burst (providing a nice shower of glowing bits for those on the firing line!). Stick rockets are very inaccurate, unlike mortar shells.
(Safety note: I was there officially to provide emergency first aid cover and ambulance cover for the teams in a firework display competition, and was wearing a hard hat and thick hi-vis coat. The Explosives Officer in charge was also there. Don't get any ideas about getting behind the scenes unless you're supposed to be there. You also don't get as good a view of the display.)