*First thing first!* Whenever you are working with any chemicals of any kind, there is inherent danger! Also, gunpowder is extremely dangerous and should not be handled without competent adult supervision! You have been warned!
Fireworks are awesome; as a high schooler I loved blowing stuff up in the back yard, including things more powerful than fireworks, so I can totally understand the interest. The short answer is, the stuff that makes fireworks explosive is gunpowder, but not all gunpowders are the same. Finer, more concentrated powder is more explosive, and if you don't pick the right kind, you may get a fire instead of an explosion, or the explosion may occur in an unpredictable way. For safety reasons, you want everything to be as predictable as possible.
To create an actual firework involves multiple kinds of gunpowder and some chemicals for coloration. If you really want to try this, I would suggest starting with fireworks that don't explode, but instead burn brightly. This will give you a chance to try adding in coloring chemicals so you can get different colors of fireworks, and then you can work your way up to rockets.
There are also companies like United Nuclear who supply components for fireworks like the chemicals used for firework colors, along with related equipment, but unfortunately they cannot provide instructions or the grade of gunpowder needed for fireworks as these have been barred by the Consumer Product Safety Commission (I was a customer before the ban). While I myself do not like bans, even on dangerous goods, I have to say again that friends of mine have been burned when playing with fireworks or have been disabled by doing stunts in their back yard, so you really need to be careful because none of these guys thought they would get hurt until they did. Also, check your local laws because some cities have bans on this activity.