I will give you a technical explanation of how it works. I believe the information in the doccentre is sufficient.
Suppose that Y is your RGB values (0..255) and Y' is your YUV values (16..235).
Now first you do the chroma subsampling. This is a rounding off YUV values whose norm is greater than the norm of Y to values which is good enough for display...