Whether you're watching a movie, YouTube videos, streaming music in Spotify or listening to a podcast, the Stop Playing function of the timer will stop any media that's currently playing.
(You can quickly launch Clock from anywhere by swiping up from the bottom of the screen and tapping on the clock icon.) So why use this over one of the many third-party apps? Not only will it allow you to delete an unneeded app from your phone, it also, unlike third-party sleep timers, doesn't require the Clock app to be left open with the screen on for the sleep timer to actually do its job.
But rather than playing a sound after the timer has finished, it stops anything that's playing.