>Whats the main difference between the two file types?
There's a huge difference, not the least of which is complexity. A .com file is nothing more than raw binary that starts at the 256th byte in memory, or 100h. This format is very old (originating from CP/M days, IIRC), and very restricted (it must fit in one 64k segment).
A .exe file is actually a file format called PE (Portable Executable). It consists of headers and segments that hold various chunks of code and other information. A complete description of the PE format is way beyond the scope of a single post, so I'll direct you here . Be sure to visit the external links as they are the real meat of the article. :)
>why does windows give higher priority to the .com file?
It's a holdover from DOS, I imagine.