A friend of mine used to work best with a beer at hand. I never could quite relate until I realized I'm doing the same thing, but with music. It helps me focus by keeping the hyperactive part of my brain occupied. (Albeit without dulling it, as beer would do.) The part that would rather, dunno, have another snack or sort my comic books in alphabetical order. Drowning out ambient noises is a nice side effect, especially when my flatmates are in the kitchen, talking. Thinking about it, a torrent of ambient noises like in a restaurant would have the same effect as long as I'm not drawn to focus on any. It's distinct noises that distract me.
The music can be anything from instrumental jazz to pop (less classical, although that happens, too). The music should be engaging enough to capture some of my mental capacity but not too complex or I'll focus on that instead. Also, the lyrrics shouldn't be in my native language, German because then it would be capturing the same brain regions I ned for work. Oh, and not too catchy or I'll sing along instead of working. And no radio because that just aggravates me.