YouTube added support for closed captioning, a feature that was already available at Google Video. If you edit one of your videos, you can click on the "Captions and subtitles" section and upload a captions file.
"Captions and subtitles make videos accessible to a wider audience by allowing folks who can not otherwise understand the audio track to follow along, especially those who are hard-of-hearing or speak other languages. Captions are in the same language as the video's audio track. Subtitles are in a different language," explains YouTube's help center.
For now, YouTube supports two formats: SubViewer (*.SUB) and SubRip (*.SRT). "To add several captions to a video, simply upload multiple files. If you want to include foreign subtitles in multiple languages, upload a separate file for each language. There are over 120 languages to choose from and you can add any title you want for each caption. If a video includes captions, you can activate them by clicking the menu button located on the bottom right of the video player."
YouTube Blog mentions some examples of videos that already use captions: a clip from Top Gear, a Japanese animation and a Physics lecture from MIT.
To turn off captions or select a different language, mouse over the small arrow button. You can either click on the "CC" option to deactivate the caption or select one of the other languages, if they are available. Embedded videos won't show the captions, at least for now.
Last month, Google showed a demo of a speech-to-text technology that automatically captions videos, but this doesn't work well for any kind of video. Even if the captions are provided by users or they are automatically generated, they will improve the quality of search results.