Chances are your iPad is set to autolock after a few minutes, that is, to go to sleep to conserve the battery. If you have music playing, the song will continue even though the screen is blank. You can summon a set of playback controls at the top of the screen without waking the iPad.
You’ll get play/pause, arrows to skip forward or back, and a volume adjustment. If you have an AirPlay device within range, such as an Apple TV, you’ll see a button for that too. These playback controls on the lock screen will work with most music apps including streaming sources such as Pandora or Spotify.