With Independence Day and other miscellaneous local summer celebrations coming up I think this will be timely.
First, this only applies if you camera has manual settings. If it only has a fireworks mode, just slap it on a tripod and let it do its thing, it will pretty much do the same things I discuss here, more or less.
You will need three things:
A camera with manual settings and shutter speeds in the range of 4-10 seconds. (Bulb is best)
A sturdy tripod
A cable release or IR remote. A countdown timer can be a substitute, though it will make timing difficult.
Settings should be as follows:
ISO as low as possible
aperture in the f/8-f/14 range
shutter speed on BULB (or several seconds if your camera has no B setting)
Setup:
Put the camera on the tripod and frame the scene kinda loosely. The explosions will be all over the place and going tight on one means you'll miss the next one. Set the camera on BULB. Hold on to the release and wait until you hear the launch of the rocket, at this point open the shutter. Keep it open through the whole explosion until the tendrils start to fade. At this point, close it and wait for the next round. Take test shots as each camera has different ISO settings, just try to get something you like. Personally, I aim to keep the tendrils form blowing out to white, I like retaining the color in them. My shots below were taken with a D100 at ISO 200, f/11. Shutter was open only long enough to let the explosion develop and drift.