If you're using a digital SLR then an ISO setting of 800 should produce good results. For a typical compact set it to 400 ISO. Set your camera on to full manual exposure and focus, and set a shutter speed of four seconds and an aperture of f/11, with the focus manually set to infinity. You will probably have to vary these a bit either way depending on the circumstances, but that's a good starting point. Check your exposure on the monitor after the first shot. If it's too light reduce the aperture. You'll probably need to set your zoom lens to its widest setting too, unless you're /really/ far back. The shots on the first page were taken with a telephoto lens from about half a mile away, while the one below was taken with a 24mm wide-angle lens.
As for timing, that obviously depends on the type of firework, but for most rockets if you start the exposure just after it takes off, a four-second exposure should capture the whole thing. For smaller fireworks such as mortars that fire faster, reduce the exposure time to one second and the aperture to about f/4 - f/5.6, so you can shoot more quickly.
You'll probably need to wait until the first rocket goes up to aim the camera and frame the shots properly, but once you've found a good angle that will capture all the fireworks in the frame, lock your tripod off and take a number of shots from the same angle. There's no point trying to move the camera to track individual fireworks, or to try to perfectly frame every shot. Even the biggest and best fireworks can be unpredictable, and the cheap ones you buy at the corner shop are often a completely unknown quantity; you can never tell where or how high they're going to go, or even if they're going to burst in a spectacular display or just fizzle out with an amusing whistling noise. Taking good photos of fireworks is as much about luck as it is skill or preparation, so take /lots/ of shots. Most of them will probably be rubbish, but there will be a few good ones.
Since it's pretty much impossible to frame the shots as taken, and exposure is also going to be a bit hit-or-miss, most firework photos can be improved with a bit of post-processing in an image editing program. You can crop to improve composition, and the Levels tool will correct the exposure. As always, if you have Raw mode then use it. The extra colour depth and exposure latitude will help to get the best out of your shots.
One of the reasons why I recommended locking off your tripod and taking a number of shots from the same point is that you can then easily combine several photos together into a single composite. Particularly at small home fireworks displays, some of the individual fireworks may be a bit of a disappointment, but if you can combine two or three together in the same photo they can look a lot more interesting.
As long as your photo editing software has layer blend modes, they it's actually very easy. Simply copy and paste one picture on top of another, and then set the layer blend mode to Lighten. Any areas of the top layer that are darker than the layer below, which will include the night sky background, will be ignored, while the lighter areas - the firework itself - will be superimposed on the lower layer. You can repeat this several times, but don't overdo it, or you'll just end up with a jumbled mess. Usually two or three layers is enough. Next simply flatten the image and crop to taste.