There's also a third type of closed captioning, live display, which is halfway between realtime and offline. The closed captioner has a videotape or an audiotape in advance and can create a complete closed captioning file from that, but the captions are sent out live and encoded into the signal as the show airs. Talk shows, newsmagazines, and soap operas are the types of programming that are most often captioned this way.
For the viewer at home, the rule of thumb is that if the captions are in the pop on style, it's offline; if they're rolling up a word at a time, it's realtime; if they're rolling up a line at a time, it's sometimes live display and sometimes offline. (In general, if the captions are leading the dialogue as they roll up, it's offline, and if they're trailing, it's live display.)
The captioning industry in the United States evolved such that, in most cases, the networks and program producers don't do their own captioning, but instead contract with separate companies to do the captioning for them. E! and HBO are the notable exceptions that have their own captioning departments.
The three largest television captioning companies are The Caption Center, headquartered in Boston, which is a division of PBS affiliate WGBH, the National Captioning Institute, headquartered in Washington, D.C., and VITAC, headquartered in Canonsburg, PA (near Pittsburgh), although all three also have offices in Los Angeles, which makes it much easier for the post-production companies to deliver videotapes. There are several other large captioning companies that mainly handle videotapes and DVDs, such as Captions, Inc., plus a bunch of smaller captioning companies, but if you're watching network TV in the U.S., it's a safe bet that the captions you're seeing are the work of one of the Big Three.
Each has its own style guide, and it's therefore quite possible to tell whose captions are whose without having to see their credit at the end of the show. It's easiest with the offline pop-on captions:
There are other individual quirks between the companies, such as how they denote sound effects, but the above are the easiest to quickly spot.
By the way, any misspellings you see in offline captioning are usually the fault of your TV reception. Most often, a glitch will cause two adjacent characters to drop out of the captions. The second most likely cause is that the captioner wasn't given a script and had to try looking up a piece of jargon or a place name on the Internet, or had to guess at the correct spelling of a new character's name.
Occasionally, some words will be missing from the captioning, or some phrases will be rewritten. If it's realtime captioning, that's most likely because the stenographer is running behind and is desperately trying to catch up. In offline captioning, it's more a matter of reading rate. In the early days of captioning, the thinking was that deaf people weren't able to read anywhere near as well as hearing people, so captions were kept to a very low reading rate. As people have gotten more and more used to reading closed captions, reading rates have increased steadily. Today, because many deaf viewers have said they'd rather have the opportunity to try to read every word, and because there are more hearing viewers than ever before, many captioners just cram everything into the captions without worrying about reading rate..
If the captions don't match the dialogue at all, that's almost definitely because there was some last minute editing done to the audio, and the captions couldn't be fixed in time.
I've been a captioner for one of the Big Three since 1997, first working in live display and then in offline. I've captioned so many different shows that, if you've ever watched TV with the captions on, you've probably seen my work.