irishrule812,
The videos played through YouTube on the iPhone or the AppleTV are the videos that YouTube has convertet to H.264. As mentioned in the press release linked below, at the time the iPhone was released this was about 10,000 videos. Additional videos are being converted each week, until the entire YouTube library is available in H.264 format.
The press release can be found here:
http://www.apple.com/pr/library/2007/06/20youtube.html
Hope this helps,
Nathan C.