Music skipping frequently especially when switching apps?

I listen to Apple Music and when I go into apps for example Snapchat or instagram the music cuts in an out or just skips. It’s a bit annoying, any reason why?