The easiest way is to use two browsers. I use Chrome for background YouTube audio and Safari for actually browsing. Of course, you could reverse it so you would use Chrome for browsing and Safari for YouTube.
Just open a YouTube video in your 'secondary' browser (Chrome for me), then press the home button, swipe up from the bottom to reveal Control Centre, and press play. Then you can use whatever apps you want (except your secondary browser) with YouTube in the background.