If it's a big hole fix-a-flat won't work. It says right on the can that it isn't permanent. It won't repair a tire, the can says to cut the nail or whatever it is as close to the base of the tread as you can and use the can, then repair the tire. If it was a nail use a $5 plug kit like Ler said or get it repaired professionally if you don't feel like trusting a $5 plug.
I however have used Fix-a-flat successfully twice. It was basically when I've had slow leaks where the tire would lose about 10 psi a month or less. I wasn't able to find anything that was lodged in the tire on inspection and couldn't spot any leaks using soap, it just leaked too slow. I used the Fix-a-flat and it fixed the problem permanently until I replaced all four tires when they all became bald. I carry a can in the back of my primary car right next to the jack. When I replaced the tires, I told the guys that I used the product and they said it really doesn't matter and I saw the rim when they demounted the tire, it didn't look dirty, and the new tire balanced with the same sized weight as the other tires.
My personal recommendation is to buy the "big tire" sized can unless you drive a compact car with really small tires. The big can brought my tire up to 25 psi when it was 10 psi, so it works as an inflator to an extent, at least to fill the tire the rest of the way.