NOTE: Sorry if the video freezes up occasionally. My laptop's having a hissy fit today for some reason. For new subscribers (or people who need a refresher course), here's a video of frequently asked questions and discussion on topics that keep popping up on here. I tried to keep it short and failed miserably, as usual.
To listen while using other apps, switch the player to Picture-in-Picture (PiP) during playback — it keeps playing in a small floating window (the screen stays on).
To listen with the screen fully off, in-browser playback stops by YouTube's design. Open the video in the YouTube app to keep listening where background playback is supported (e.g. with YouTube Premium).
Open in YouTube app