I was having a problem with flats for a while. What I've learned is some tires are a lot more resistant to punctures than others. Usually the tire manufacturer will state if the tire model is puncture resistant.
Last year I didn't really understand much about bicycle tires, and I bought some that are soft and puncture easy. Since I had so many inner tubes with holes in them, I decided to try placing the old inner tube around the new one. Since doing that I haven't had another flat.
Here's a thread I made about it.