You should also communicate. Talk to your boss and/or HR about how it distracts you and disrupts your work. Suggest solutions; Headphones paid by your work, sound-proofing office walls, move to another location or move other people to another location.
If you get distracted by music, try getting a playlist of instrumental music, or music with lyrics in a different language. I can code with lyrics no problem, but when I'm writing an article or something I go music w/o lyrics... or music in Spanish!