A tube with a hole will not hold air. Even the smallest pinhole with eventually leave you with a flat. Pack at least one spare tube in your repair kit, and bring two tubes for longer rides or when riding with a group. Spare tubes let you skip patching and will get you back on your bike quickly. Purchase tubes that match the size and valve of your rims.
Tire levers let you take your tire on and off your rim so you can get to the flat tube inside. Taking a tire off with only your hands can present a frustrating challenge, making tire levers a must-have for your repair kit. Most tire levers come in a pack of two or three. Having a second lever helps with tight tires, but you can often get by with one.
Traditional patch kits come with sandpaper, rubber cement and patches. These kits let you cover the hole in your tube so you don't have to replace the torn tube with a new one. When installed properly, patches hold up well. Keep one of these kits as a backup to your spare tube, or swap your damaged tube for a spare and use your patch kit at home to repair your old tube. Keep this patched tube as your new spare.
Use a hand pump to refill your fixed tube. Though not a fast way to get air into your tire, a hand pump can prove a reliable tool. Buy a pump for your style of bike. Road pumps are narrow and long to get in less air at a higher pressure, while mountain pumps are short and wide, allowing more air to get into your tire at a lower pressure.
CO2 cartridges will fill your tire much more quickly than a hand pump. A 16-oz. cartridge will fill either one road tire or one mountain tire. Carry at least two with you, and learn how to use them before you leave. (You only get one try with CO2.)
Energy Bar Wrapper
Don't throw away your energy bar wrapper. Use the wrapper to cover a tear in your tire that would otherwise let the tube squeeze through. This may result from a massive piece of debris you ran over or from a minor blowout. Only use this technique when you don't have another option to get home. Replace your tire before your next ride. If you don't have a wrapper, use a dollar bill, but don't forget to take it out once you replace your tire.
Even when you have the right gear and knowledge, something could still happen that leaves you stranded. Pack your phone as part of your kit to get you out of these situations.