To the uninformed, fixing a flat tire may seem like a daunting task, but armed with the proper knowledge, it's a relatively simple process. There are essentially three steps: Removing the tire from your car, determining if the puncture is repairable, and making the repair.
If you are driving when you realize your tire is going flat, pull over immediately. A flat tire that is driven on for even a short distance is essentially ruined. The rim will cut into the inside of the flat tire and cause damage that may not be visible on the outside of the tire. It may seem like a good idea to just travel slowly to the nearest tire store, but it's not. A new tire for your vehicle can cost hundreds of dollars, far greater than the cost of pulling over and taking 15 or 20 minutes to put on your spare.
If you are unsure how to put on your spare tire, consult your owner's manual. If you're physically unable to change your own spare, consider purchasing AAA Roadside Assistance or something similar from your insurance company. In addition, never use fix-a-flat to temporarily repair a leak. Many newer vehicles have sensors inside the tire to monitor air pressure and fix-a-flat can damage these resulting in significant repair costs.
Once the tire is removed from the vehicle, you need to determine if it can be fixed. If the tire has a cut or puncture on the sidewall, it cannot be fixed. The flexing of the sidewall during normal operation will cause any repair to leak and greatly increases the chances of the tire sidewall blowing out. If the tire is punctured in the tread, chances are it can be repaired with either a plug or a patch, provided the puncture is not too large.
If you think your tire can be repaired, take it to a tire store and have them do it and replace it on your car. Any tire that has gone flat should be removed from the rim and inspected for internal damage, especially if driven on deflated. If the tire was punctured by a nail or similar object, it's perfectly acceptable to repair it with a vulcanized rubber tire plug. Many of the do it yourself kits do not contain vulcanized rubber plugs and will not hold up over the life of the tire. Tire plugs made of vulcanized runner will meld with the tire over time and greatly increase the strength of the repair.
If the tire has been cut in the tread area, an internal patch may be necessary. This requires buffing the inside of the tire where it is cut until smooth and gluing a rubber patch over the damaged area. Most tire manufacturers recommend using a combination plug/patch which fills the hole externally while covering the hole internally. This is really the best solution for repairing a tire properly. It may take a little longer and it must be done by a professional, but it's much preferred to a tire blow out while traveling down the freeway at high speed.