The youtube downloader sites are perfectly fine. Or you can also download some programs that do the same. You can also get Chrome or Firefox extensions that add a download button onto youtube videos. They all mostly work by extracting a direct URL to a mp4 video file (Since it is right there on googles servers, youtube just doesn't expose a download link for it)
Tho these methods typically get you a lower quality version of the video in 720p, since this mp4 format is a legacy backwards compatibility thing. Youtube uses a different format that is grabbed piece by piece and then assembled on the fly, so it can't be downloaded as a file(or at least without conversion).
Youtube doesn't exactly encourage people to download videos, but you will never get in trouble for it. People do this all the time, including youtubers (How else do you think they put in spinets of other peoples videos into theirs when for example commenting on them).