How to change a flat bicycle tire
Practice - Fixing a flat tire is easy, with a little practice you can do it in 5 minutes or less. Try it at home just to make sure you are ready and practiced. More info about tires on the Tires Page.
Remove the wheel - If it's your back tire that's flat, first shift the chain to the smallest gear on the back. This will make it easier to slide the wheel off, past the chain.
If your bike has rim brakes (brake pads that squeeze the wheel to stop), you will have to loosen the brakes. Most bikes have a quick-release mechanism at the brake caliper that will either loosen the brakes or disconnect the cable completely so that you can slip the tire/wheel out. Quick-release mechanizms require no tools, so you can do this by hand. Next loosen the wheel at the hub using the wheel's quick-release lever.
If your bike has disc brakes you don't need to loosen the brakes and you can just loosen the wheel at the hub using the wheel's quick-release lever.
Remove the tire - Use your plastic tire levers to remove the tire. Prying a tire off with a metal screwdriver will damage the rim, and you'll get more flats in the long run. Insert the flat end of one tire lever between the tire and the wheel, and pry the edge of the tire up. Hook the hook-end of the same lever on a spoke. It should hold itself in place between the tire and the spoke. Now insert another tire lever right next to the first one, but don't hook it. Slide this one sideways between the tire and the wheel. This should peel the tire right off.
even better - You could probably avoid all this hassle by getting Continental Gatorskin tires. I've been riding the same set 16 miles per day for over a year - not a single flat tire yet, and I've rolled through plenty of broken glass. I used to get flats all the time.
Remove the innertube - Pull out the damaged innertube and save it for later. You can patch it at home and use it as your next spare.
Check the tire - At this point you should give your tire a careful visual inspection. If there is a thorn or piece of glass stuck in the tire rubber, it will only puncture your next tube. Make sure the problem is removed before installing the new innertube. Run your finger slowly along the inside of the tire to double check. Be careful not to cut yourself if you do find a piece of glass or a nail in there.
BIg Deal - The most important step in fixing a flat tire is to find out what caused the flat and removed it from the tire. Otherwise you'll have another frustrating flat in the very near future. Get some tweazers if you have to. Find that little piece of glass or metal and pull it out. Keep looking until you find it!
install the new innertube - I like to put one or two pumps of air into a fresh innertube, just to make it round. It goes in the tire easier this way. Put one side of the tire over the lip of the rim. Tuck the new tube into the tire. Then put the other side of the tire on the wheel, working your way around.
Pump it up - Pump the tire up 5 or 6 pumps, rotate it around - massage the tire a bit to make sure the bead is seated securely - then pump it up all the way. I strongly suggest a pump with a gauge to ensure that you are using enough air pressure. Just "eyeing" it will get you too low of pressure 99% of the time, and that leads to more flat tires very quickly. Get a guage and make sure you are pumping your tires up to 80 pounds or more, or whatever is recommended on the side of the tire.
re-install the wheel - Put the wheel back on and you are good to go. Be sure to re-connect your brakes if you loosened them, and be sure to put a new spare innertube in your kit/pack for next time.
Link to main tire page, pinch flat info.