Google provided the capability for captioning early on for its Google Video site and brought this technology to YouTube after acquiring the site. AS of this time, YouTube captioning supports two formats, SubViewer and SubRip. These are basically text files that specify the timing and text for the captions. The problem is that creating these files by hand in a text editor is labor intensive and time consuming. Fortunately a free tool exists to make the process more efficient. Enter CaptionTube, a free Google Appspot tool designed to make the captioning process more convenient.
captiontube.appspot.com (Log in with your Google ID)

The interface is easy to learn and hides all the complexity of time codes and formatting required by the .srt captioning format. Once you've finished captioning your video you can have a YouTube compatible caption file sent to your email address or downloaded to your computer. Once you have the file (with an .srt extension) follow these instructions to add the captions to your video:
(from the YouTube help page)
After logging into your YouTube account:
- Mouse over the 'Account' link in the upper right corner of every page.
- Click 'My Videos'. You will then be directed to a page showing your uploaded videos.
- Find the video to which you'd like to add captions/subtitles, then click the 'Edit' button.
- Click the 'Captions and Subtitles' link in the menu bar.
- Click the 'Browse' button and find the caption/subtitle file to upload. Additional options will appear. Select the appropriate language. If you wish, you can also enter a track name.
- Click the 'Upload' button.
Chris Parillo created a short 3 minute video on the topic check it out.
(YouTube teaching YouTube, gotta love it!)
Overstream
Overstream is an alternative resource for captioning YouTube videos. The site offers a few more features for captioning but overall provides the same result; a YouTube compatible caption file in .srt format. It's also free and worth a look. (You have to register and login to the site to use the captioning tool)