Not everyone is prepared to fix their flat when it happens. Here are a few helpful hints to make the repair go quick and smoothly.
The first thing to do is get off the road and to a safe place. When at all possible off the shoulder and away from the road traffic is best. A park bench or picnic table are great because they provide a place to put your gear while you work. You can hang the bike by the nose of your saddle from a low branch to get the bike off the ground. Otherwise upside down on its saddle and handlebar is kind of the standard. If this is a rear flat, shift into the smallest gear in the back. This moves the chain as far out of the way as it can be to clear the derailleur. I like to spin the wheel slowly and inspect the tire before removing the wheel. This allows me to get a good look at it before I start. Most of the time you’ll find the cause by doing this. It is very important to remove debris from the tire otherwise another flat will happen sooner than you think!
After removing the wheel, you want to pinch the tire on the sides to move the bead into the center of the rim. This will make the tire fit more loosely and aid in removal. If you do this most of the time a single tire lever is all you’ll need to remove the tire. Starting opposite the valve on the wheel (this is where the tire is loosest on the rim) slip the lever under the bead and slide the lever away from you. If you pull towards your face you could end up punching yourself in the nose. Once one full bead is off the rim the tire can be peeled off completely. If you haven't already now is the time to find the cause. If there is a cut in the tire you may need a boot. This can be anything from a folded dollar bill, leaves, or a business card. I prefer the Park Tool Tire Boot TB-2.
When you have found and eliminated the cause, it’s time to reinstall the tire. Start by inflating the tube just enough to hold its shape. Find the label on the sidewall and install tube with valve in the center of the label. Install tire on the rim with the tread facing the correct direction. When installing the tire pinch the tire into center of rim. This will help when you get to the last bit to install. Hold the wheel on your toes with the valve oriented at the top pressing down while walking your hands back and forth. When you get to the last bit use the heel of your hand to install completely. Inflate tire about 20psi and check to make sure the bead is straight and the tube is not pinched between the rim and tire bead. If that checks out, inflate to the psi you like.
After all that. Reinstall your wheel. Make sure your brake works correctly and return to your ride!