Here’s a quick guide to exporting a web-ready video out of iMovie ’13:
MORE INFO
You can also try publishing directly to YouTube or Vimeo, but I’ve never had much luck with those options. Here’s Apple’s iMovie help page on Exporting Online
The option I recommend AGAINST is exporting to QuickTime. Use that only if you plan to import your movie into other video editing apps or to burn it to CD, NOT for uploading to the web.
The option I use is Share to iTunes, but I set my Mac to open all m4v files in QuickTime Player instead of iTunes. (See: How to Change the Default App that Opens Files on a Mac)