is also a factor in blurring the background, if you're using a telephoto lens and the subject is not in the same focal plane as whatever is around it, you can achieve a nicely OOF background
(click for a larger view)
I used a 400mm at f/5.6 for that photo.
Generally, though. you will need a faster lens (wider aperture) to get close to your subject and blur the background. This photo is made at f/3.5 which I needed to keep the subjects in focus but also knock out the background
(click the photo for a larger view)
here's an example of f/1.4 on a K10D, so that the 50mm lens is operating as an 80mm lens, which is perfect for a portrait, but the background is not blurred as it would be on a FF sensor such as the 5D. The distance from the camera to the subject is also a factor here, but I was able to use f/1.4 and keep the subject in focus and the background works
(click the photo for a larger view)
finally, you can use an extension tube to put the background OOF, but the DOF is razor thin, which might work for macro subjects, but it's pretty tricky with people.
HTH