See if this helps:
Code copied from here, jsFiddle Demo
As far as where to learn about how to do it is concerned, have a look at:
- YouTube Data API Protocol Reference Guide
- Retrieving Data for a Single Video
- Understanding Video Feeds and Entries
- JSON/JavaScript Guide