UPDATED: 6th November 2013
When Apple released iOS 6 and removed the native YouTube app, Google released its own YouTube app. However, unlike the native app in iOS 5 and earlier versions, Google's version doesn't allow you to play the audio from videos in the background. See also: How to download YouTube videos to your iPad
The same is true in iOS 7, but there is a way to listen to YouTube while using another app - or in standby mode - on your iPhone, iPad or iPod touch running iOS 7. (Another reason to update to iOS 7, then.)
Here's how to do it.
1. Launch Safari, the default browser on your iPad, iPhone or iPod touch. (You can also launch another browser, such as Google Chrome, shown here.)
2. Search for YouTube in the address bar / search box. Search for a video that you want to listen to.
3. Tap on a video from the list of results and let it begin to play.
4. Tap your home button to return to the home screen, and then swipe up to bring up the Control Center. Tap the play button to continue playing only the audio from the YouTube video.
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.
6. You can also tap the sleep/wake button and the music or audio from your chosen video will continue to play.
You might also like: How to download YouTube videos to your iPhone or iPod touch