There are many different video formats, each with its own benefits and drawbacks. Some formats are better for editing, some for streaming and some for playback on your TV.
The most common format for home video is MPEG-4 AVC/H.264, which uses a lot of compression to allow a high quality image to be stored on a DVD or Blu-ray disc in a small space. It also allows it to stream over the internet more efficiently than other formats. This is why most online video services like YouTube use it as their standard format — it works well on most devices and has good compatibility with other software.
However, this means that even though your video may look great on YouTube, it might not be as good when you try to play it back on your TV or computer at home!