Expanding on Matt's answer, to blur based on a mask in the compositor:
Create a new mask in the UV image editor by selecting Mask mode and clicking new:
Add a mask primitive (ShiftA) and edit it to match your the part of your image you don't want to blur (or the other way around, do whatever is easier to mask because you can always invert it later) using CtrlLMB to add more points.
Once you have your mask, add it in the compositor with a Mask node (ShiftA> Input > Mask and pick your mask from the drop down):
You should be able to view it by connecting it to the viewer node:
Here are two methods for bluring based on this mask:
Using a Gaussian blur node with a variable size:
Using a Fast Gaussian blur (which doesn't support variable sizes):
I believe method 2 is a little faster (in computation speed) for large blurs, however it's a little more complex and artifact prone than method 1.