How come if I play a video when online on a website and then turn off the wifi, the video still plays for the part that loaded? Where does loaded part of the video get stored when offline?
The reason the video's still playing is called data buffer.
WikiPedia explains this here.
In your special case of video streaming:
To create the illusion of a continuous stream of video, the player creates a buffer(cache) that contains several time slices ahead of the current time frame to avoid that each slight connection interruption would lead to a dropout in the display of the video.
In browsers, the buffer is located in the browser cache and is explained in this article. This article explains where the cache of Firefox is located. Unfortunately this differs from version to version and from browser to browser. An exception is the Adobe Flash Player cache which is not located in the normal browser cache, but in a separate Flash directory (Look for the Adobe Flash Data Directory).
So to locate it browser-independently, you'd have to check a lot of possible places.