Music can boost your workout by distracting you from pain and fatigue, but it’s not a boon to every workout. Depending on your personality and your sport, you may be better off skipping distractions.
I’ve spoken before about my distaste for music in particular training. For cycling, it’s a Darwin Award to me. There’s the same potential for running, but not as much and it can be more beneficial IMO to have music than while cycling. I’ve seen setups that allow you to listen to music while swimming. I come from cycling – group rides usually provide a partner but otherwise are without music so being without never bothered me.