1. First, save your iMovie project (File>Save Project or Save Project As…)
2. Go to File>Export…
3. Go to the drop-down menu next to Compress movie for: , and select whatever quality you like.
4. Choose a suitable name for your file
Things to bear in mind:
For individual uploads, YouTube has a file size limit of 1Gb and a film-duration limit of 10 mins. Bigger files take longer to upload (and to appear when people want to view them); this might well be the case if you choose a setting that maintains the frame dimensions, aspect ratio and frame rate of our standard Mini-DV footage (PAL, 720 x 576, 25fps). In any case, YouTube will automatically re-compress your film back down to 425×350!
With this in mind, for most purposes it may be best to choose the CD-ROM setting in the Compress movie for: drop-down menu.