When I was selling tvs I had a partially deaf customer that taught me all about captions and subtitles. its actually pretty interesting stuff and Vitac, one of the largest providers of captions, is local in Canonsburg PA.http://www.vitac.com/resources/index.asp
Live programming is captioned by specially trained realtime captioners who listen to a program as it is airing and type what they hear on stenography machines, often at speeds exceeding 240 words per minute. These words feed into customized software which transmits the captions to display them live on your television screen.
I am not sure if I have something set up incorrectly in my home theater chain, but I've noticed that when a secondary audio track is available on a program that I typically don't hear anything on that track. I love it for watching hockey and football - you hear the crowd and noise from the players but not the play by play.