With web video, there's two main ways to provide captions/subtitles:
- Some web video formats, e.g. MP4, can have the subtitles/captions embedded in the video (MP4) container as meta-data which some media players can read.
- More commonly, the subtitles/captions are provided as a small separate file, e.g. .srt, .xml, or .smil, which most web media players can load in addition to the video file and then synchronise the subtitles with the video.
#2 is more popular because it's easier to edit and easier to add new and/or additional subtitles/captions to videos, e.g. providing several languages like TED Talks often do.
Creating subtitles/captions is time-consuming, tedious work and you can find 3rd party services that can do it for you faster and relatively cheaply. Once you have the files, you can edit them yourself with a simple text editor to clean up any typos and other mistakes (They often use speech recognition software to do most of the transcription automatically and aren't always the best proof-readers).
If you're using DVDs with subtitles already embedded, a popular way to automatically extract the subtitles is called SubRip: http://zuggy.wz.cz/ which is free and open source software.
Almost all films and TV shows these days come with subtitles for the hard of hearing and some people like to use them when they watch films and TV where the characters have strong accents and/or use a lot of slang, e.g. The Wire (Baltimore) or Trainspotting (Edinburgh).
HTML5 support for captions/subtitles isn't as good as Flash based players. It'll be more difficult to get it to work across different browsers and operating systems. A common solution is to simply hard-code the text into the video image.
And yes, it's not a good idea to store a lot of video in Moodle or to use Moodle to serve videos. It'll quickly use up the server's memory and slow everything down. If you've made the video or had a part in making it, you can host it for free on Vimeo https://vimeo.com/ and they also offer paid pro accounts that allow you to do more - There's less nonsense and fewer problems than with Youtube hosting. Then there are dozens of 3rd party media server providers that range enormously in price, quality of service, and support. If you need to keep your videos private and under your control and deliver to computers and devices across operating systems and browsers, this would be the most appropriate option: Currently, everything with video gets more complicated, problematic, and expensive when you want to deliver to mobile devices. It'll be a while before the technology catches up with laptops and desktops.