The Mp4 and M4v formats are interchangeable. M4v is an Apple format.
All movies exported from iMovie are Mp4, except if you export using the Best Quality (pro res) setting that will give you a .mov file. If you export at Best Quality (pro res) the .mov file that you get will be a much higher bitrate than the Mp4 file, and therefore about 4x larger file size. A tad better quality. Either format is fine, depending upon your purposes. For example, if you were intending to post on the internet, you probably wouldn't want a huge file like you would get with .mov. For high quality playback and almost universal compatibility with a wide range of devices and software, Mp4 can't be beat. If you were going to do a lot of finite complex editing, maybe the .mov file would be better.
-- Rich