Fireworks release three forms of energy; sound, light and heat. Sometimes when you hear a boom it is because air travels faster than the speed of sound and creates a shock wave or a sonic boom. To produce colours in fireworks, we have to heat metal salts and they will emit colours. The atoms absorb energy and rearrange its electrons from lowest-energy to higher-energy and will leave some excess energy to emit light. The amount of energy determines the colour and this varies from element to element due to wavelengths. More energy means that there is a shorter wavelength light and lower energy means that there is a longer wavelength light.
Fireworks are made from metal salts put into clay, dough lumps or stars about 3-4 cm in diameter and they consist of oxidizing agent, reducing agent and a colouring agent. The appearance of fireworks is determined by its stars, clay or dough lumps. They are then ignited in from the fireworks shell by a time-delay fuse. There are many steps that take place from lift-off to the explosion. The fireworks shooting into the air is powered by the combustion of black powder.
An example of fireworks is sparklers. Sparklers are a type of firework that produces sparks and doesn't explode. Aerial shells also have similar characteristics but they work differently. The simplest form of fireworks is basically gunpowder wrapped in paper and a fuse so any other kind of fireworks is basically adding more onto it.