How come YouTube videos play without Flash support in OS? A relative told me that iOS can playback YouTube videos.

I thought that YouTube requires Flash. How come this is possible without Flash in iOS?
YouTube videos are offered in multiple formats, not only Flash. If viewing on an iOS device, then you get H.264 format.