This post is a response to a reader question.
Summary (for a six year-old)
There are lots of different kinds of fireworks, but basically they work by launching a bundle of things into the air which explodes mid-air.
The different colors and arrangements that fireworks make is the result of how the bundle is arranged and the kinds of materials that are used.
- How Fireworks Work at HowStuffWorks for more information.