A flat tire may be able to be repaired. It can be really expensive to buy a new tire, depending on what kind of tire you are dealing with and what kind of car you have, so it may be a good idea to take your flat tire to a tire repair shop and have them see what can be done with it. They will be able to tell you if your tire is repairable and whether or not you should repair it. There are some criteria that the tire has to meet before they can repair it.
Location
One of the things that you have to know is where the damage is. If the damage to your tire is in the sidewall, then your tire isn't repairable. If the damage is in the tread, then the odds are that your tire may be able to be repaired. While the repair shop is looking at the location of the damage, they will also look to see if you have a lot of tread left on the tire. If the tire doesn't have much tread left, there is damage to it in the tread area, and it's far enough away from the sides, you still may not be able to get the tire repaired, just because of the lack of tread.
Number
If you have more than one puncture or area of damage on your tire, you may still be able to get it repaired, depending on how large the damage is and how close they are to each other. The further apart the damage is, the more likely to be able to be repaired your tire is. The reason that the damage has to be a distance apart is that any damage weakens a particular area. So, if there are two punctures that are relatively close to each other, that particular area is going to be much weaker than if there were just one puncture, and even a repair may not make it strong enough to actually go out safely on the road. The tire repair shop will be able to tell you if you can get the repair done even with more than one area of damage.
If you have a broken tire, you may not have to go out and buy a new tire. You may be able to get the tire repaired, which can save you a lot of money.