Don’t engage them. When someone bothers you for the umpteenth time, try not to talk to them. If you appear supremely focused, keep your eyes on the computer screen, and give short, pointed answers, they’ll get the clue and find someone else to bother.
Invest in headphones. Assuming it’s okay with the higher-ups, wear headphones or other noise reducers while you’re working. Turn up the volume and ignore, ignore, ignore. People will be far less likely to bother you if they have to tap you on the shoulder to do so.
Put up a red light. Casually mention that when you’re working particularly hard or are under deadline, you’re going to post a red piece of paper on the back of your chair or the entrance to your office space. Red sign = keep the noise down and don’t bother me.
Offer a solution. If the noise from your co-workers doesn’t diminish, go to your boss with an action plan. Hard-core solutions include: a company noise policy, singling out repeat offenders and confronting them, or establishing a quiet room (perhaps an unused conference room) where employees under pressure can go to think or work. Silence is within reach.