First, this is a general answer, since you are just getting started. the concepts you are asking about are simple, but there is a lot of situational nuance that muddies the waters, and I won't be going into all that.
First, not all videos are provided by servers and websites the same way. Especially in the old days, small videos could be embedded in pages as a binary download, and once the download is complete and the page renders, the content is played by javascript or a local runtime like flash. This is common in for Ads. There are a few things to consider about this method:
- The entirety of the file is downloaded, and usually up front.
- The playback of the video happens entirely on the local computer.
- The browser will probably try to cache the video to disk so it doesn't need to be downloaded again on the next page refresh.
- The video format will impact how the video is decoded, buffered, and played back by the local computer, and will vary widely. common video formats run the gamut between woefully incomplete (mpeg-1), and seriously complicated (h.265).
Streamed videos are much more advanced. Software on the client and on the server work together to deliver and render the video stream Just-In-Time, using minimal resources like RAM and CPU while playing the video smoothly. Streaming allows a server to provide very large long-running videos without downloading upfront.
- The client and the server will negotiate how the stream will be provided, including things like how much buffering is desired. Some degree of "state" is maintained on both sides of the connection.
- The videos themselves will be in a format that supports all the features required for streaming.
- Just-in-time processing allows the system to buffer downloaded data to RAM, and control that buffer, so it doesn't grow to large, or empty too quickly. this is good, because a long afternoon on a Netflix binge would likely fill a small hard disk.
- Streamed video is not generally cached to disk, because it is unlikely to be reused in future. that would be pointless without a full copy of the video.
- if the local computer is stressed, some stream content may end up on disk, perhaps in a cache file maintained by the video player client, or in your virtual memory pagefile/swap. generally that will just be bits of the video however, and not really be coherent data long term.
Hope that helps.