Okay, what you need to do is convert it into a quicktime file. First, open the iMovie. Go up to the top bar where it says 'Share'. Move your mouse down to where it says 'Quicktime' and click on it. A window will pop up. Look for where it says 'Compress Movie For:' and change the pull down menu to 'Web Streaming'. Then click share down at the bottom. It will take several minutes to convert to a Quicktime file. Then, when it's done, go to YouTube and click upload to put it on YouTube.
Also, if it doesn't work, check your file size. The movie may be too big, and YouTube has a size limit. If the movie's too big, you can do one of two things. First, you can try converting it to Quicktime again, except choose a smaller file size (It should show you the file size when you choose something from the pull down menu) or you can try and take things out of your movie. Chances are, if your movie is too big, most people won't take the time to watch it anyways.
I just recently tried to upload my own movie onto YouTube from iMovie, and I had the same problem =-)