I know I suck... its been a while since I've written anything. Whatever, get over it.
Work isn't always fun and games. Sometimes its annoying. Here are some techniques I've learned, developed and employed thus far to avoid the annoying coworkers.
This is your number one defense mechanism. There is a balance that must be maintained here; If you always wear your headphones, they become less effective. However, if you don't over-do it, headphones are a sign that you're "in the zone," and you should be left alone.
This one is difficult. It works for me though because it seems like one of my projects is always having all-day telecons to fix problems. That means I can pop in and out during the day when needed to block unwanted coworker conversation starters. "Oh... sorry, I've got to dial in to this meeting... sorry."
Empty Coffee Mug
This is actually a fairly advanced technique, but once set up, this play can be run against a hurry-up offensive. Required tools: Two identical coffee mugs. Thats is. If you catch someone that is enroute to annoy and distract you... grab an empty coffee cup and stand up like you're going to get something to drink. Why do they have to be identical? It just seems to throw people off more.
If you go to someone else's desk to BS, you're in control... you can leave whenever you please (this is also useful to know if you're going to break up with your girlfriend... go to her house). Once every 3 hours or so, make a round through the office saying "whats up" to everyone that might annoy you later. Make sure to keep the conversation light. And for God's sake... don't talk about their kids; they'll ramble for hours.
Work From Home
You'll notice that you get a lot more done when you work from home (actually work... not just answer emails and do laundry). This disadvantage for this one is that you'll miss the free food from meetings, and the people you actually like in your office.
This isn't one I've done... but I've seen it work quite effectively. Be an asshole. Nobody talks to that guy.
If you ramble on for hours about your kids, or complain about "management" all of the time... rest assured, very few people are going to want to come talk to you.
(To be fair... pretty much everyone in my office is cool. I'm just really irritable.)