Depends.....
Sometimes I can plug in the MP3 player and turn it up and work just fine.... no problem concentrating on the work and the music at the same time.
Sometimes, if I'm in a bad mood or just don't want to be bothered with people around the job site (sometimes I work in nursing homes and old people in wheel chairs roll up and want to talk) so.... with ear buds in I can ignore them and then after a minute or so, I can pull one bud out and say.... "Oh, excuse me, I didn't know you were speaking to me, I couldn't hear you with this music..... " Then I turn away and get back to work,,,,, with the buds back in. most take the hint and go away, some stay and watch me work.
BUT.... when I finish the work and need to test it.... and yeah, the stuff I work on beeps and makes other noises, I do have to shut the music off to do that part of the job.
Then, there are other days where no music is the only way to roll. I usually walk around humming the beer barrel polka or some other such song.