I carry a tire pump and patch kit on long rides, but your best line of defense against flats is a really good set of tires. The Continental and Specialized brands make some good ones that are flat resistant, meaning that in most areas of the country, you will not have a flat. Beyond that, I carry a multitool that has allen wrenches, screwdriver, chain tool, and a few wrenches on it. I carry this in a good sized wedge shaped bag behind my seat. Your number one concern on long trips is your tire situation.
Before any ride, hold your front end up by the handlebars, and spin the front wheel. If it spins freely, it's ready. Do the same for your rear wheel. If one is not spinning freely, look to see if it's touching the brake pads when rotating. if so, you'll have to adjust it so that it spins freely. If not, your ready.
On short trips around town, I don't feel the necessity to carry anything but a rain parka. Make sure you have flat resistant tires. it's your number one headache.