Several chemical reactions occur to make fireworks explode. These include oxidation, reduction, and incandescence. It other words, they burn, explode, and make pretty colors.

Oxidation and reduction are really just one reaction: the redox reaction. This is what you see and hear during a fireworks display.
Oxidation is simply oxygen being produced. The oxygen is needed to burn the reducing agents which cause certain compounds to emit light. Common oxidizers in fireworks are nitrates, chlorates, and perchlorates. For example, potassium nitrate, the oxidizer used the most in fireworks, decomposes into nitrogen gas, potassium oxide, and oxygen gas. Chlorates are not used much because they are unstable, so perchlorates are used instead. Perchlorates are bonded to their four oxygen atoms, which make them more stable, and they release all the oxygen atoms when heated. Oxidation-reduction reactions occur in all explosions. Reducing agents, such as sulfur and carbon, mix with oxygen, supplied by the oxidizers, to produce rapidly expanding gases.
Burning gun powder causes these reactions, and gun powder is a major component of a firework. Gun powder is made of 75 percent potassium nitrate, 15 percent charcoal, and 10 percent sulfur. It is necessary not only to lift the fireworks into the sky, but is part of the explosive process that occurs in the air. Metal compounds can color the big boom of a redox reaction.
Incandescence is a simple chemical reaction. When an object gets hot, it changes and gives off light. In a firework, solid or liquid particles are heated to very high temperatures. These particles emit radiation, and the higher the temperature, the shorter the wavelength of the emissions. This goes towards the blue end of the color spectrum, and is responsible for the bright white colors, perhaps with a bit of blue, that you see in fireworks.
It only takes a small increase in heat to make a much brighter color. Flares of white light are made of reactive metals, such as magnesium. You can also get a burst of bright light when aluminum and potassium perchlorate (flash powder) explode. Gold colored sparks are a result of charcoal and iron particles, which don't get as hot as the metals.
Inside a firework, there are gunpowder and "stars." These "stars" produce the colors, sparks, and bright light in the fireworks. As the fireworks are flying into the air, the second fuse is burning, which ignites the bursting charge. The bursting charge is like a wick inside the firework, that ignites the gunpowder and "stars," which then cause the explosion of light, colors, and sound that makes up a firework. When you see these beautiful colors, you might wonder what type of simple chemical reaction occurs in fireworks. The colors are produced by the redox reaction, and depend on what kind of salt or metal is burning. To produce very bright light, you use magnesium, aluminum, and titanium. Here are the combination of metals and salts to produce different colors:
There would be no fireworks without gun powder. It lifts the fireworks in to the air, and then ignites it to start the colorful display. It was invented in China, sometimes between 1000 and 2000 years ago. Legend has it that a cook accidentally mixed sulphur, charcoal, and saltpeter (potassium nitrate) in a bamboo tube, it somehow ignited, and exploded. The next invention was the firecracker. It was invented by a monk, and since it explodes so loudly, it was used to scare off evil spirits.