In the US market, captions differ from subtitles, in that the latter are used when a foreign language is being spoken on-screen. However, this distinction is not made in Europe and other markets.
Closed captions are so-called because they must be selected, otherwise they are are "closed off" from normal viewing. Open captioning is always on, though this is not very common.
Most commonly used by those who are hard of hearing, captions may also be used in situations where the audio is difficult to hear, such as in a noisy bar. Many televisions also have a default captioning system that activates when the TV is muted.
Another growing portion of the population that uses captioning are those who speak English as a Second Language. For many learning ESL, captioning makes enjoying the television or a DVD much more enjoyable and serves as a learning tool.
Live television is captioned in real time by someone using a stenographic device to type. Pre-recorded shows are transcripted, so the captions are produced before the show goes on the air.