When iOS 8 was first released, you could listen to the audio from the Google YouTube app with the screen turned off, but that's no longer possible. Here we'll explain a workaround using Safari and how to use a different YouTube app to play music and playlists in the background while you use other apps or turn the screen off. See also: How to download YouTube videos to your iPad
Note: the video above shows the process in iOS 7, but it's identical in iOS 8.
How to play YouTube in the background via Safari
This works in both iOS 7 and iOS 8, with the limitation that you can't skip between tracks in playlists.
Step 1. Launch Safari, the default browser on your iPad, iPhone or iPod touch.
Step 2. Search for YouTube in the address bar / search box, or simply type youtube.com.
Step 3. Tap the small magnifying glass icon and then search for a video that you want to listen to.
Step 3. Tap on a video from the list of results and let it begin to play.
Step 4. Press your device's home button to return to the home screen. The music will stop. But, swipe up from the bottom to display Control Center. Tap the play button to continue playing the audio from the YouTube video.
Step 5. You can now launch another app, such as Messages or Mail and keep listening while using that app. Some games (those which allow you to keep listening to your own music) will still be usable without cutting off the audio from the YouTube video.
If you want to browse the web, you'll need to use a different web browser from the one which is playing the YouTube video, since switching tabs will cause playback to stop. If you don't have another browser installed, try Google Chrome.
Step 6. You can listen to YouTube with the screen off, too. Press the sleep/wake button to turn your device off and the audio from the YouTube video will stop. Now press it again and tap the play button to restart the audio. Now when you turn off your iPhone or iPad, the audio will keep playing.
You might also like: How to download YouTube videos to your iPhone or iPod touch
How to listen to YouTube playlists in the background
If you want to listen to entire playlists from YouTube in the background, you'll need to install an app which allows this, since the official Google YouTube app doesn't. Go to the App Store and search "YouTube background" and a selection of apps will be shown. They're all very similar and most of the free ones have annoying ads unless you pay for the 'pro' or premium versions.
One app which is free and allows you to listen to playlists in the background is Free music for iOS 8