Yes, YouTube has a paid membership option called YouTube Premium that removes advertisements and allows you to play videos in the background while you do other things. If you have an iPhone with the official YouTube app, you may subscribe to YouTube Premium without ever leaving the app.