The wikipedia article is geared more towards a pyrotechnicist. But what's there is the simplest way to describe the item, a sparkler, while covering every possible formulation, and still not giving exact formulas so people don't try to mix them up in a basement. Metal + fuel + oxidizer + air
metal oxide + heat + light, like
Dan: said. If you're really interested in how fireworks function, you can read a book on pyrotechnics. Some of the best authors -- Weingart (talks about crazy stuff, he's from the 1940's), Lancaster (known as Master Blaster Pastor -- Anglican Minister who did the fireworks for Charles and Diana's wedding), and Davis (who tends to fill in the gaps between the two.) Fireworks are more chemical engineering than chemistry. We know certain mixtures of fuel and oxidizer burn fast and hot -- how to get them to pop, or burn fiercely, and not explode like a bomb -- that's more about shaping the mixture, and dulling it with inert additives.