".exe" and ".com" files are basically two different file formats for executable code. Note that DOS selects the file format
not based on file name extension but rather by looking at the first 2 bytes in the file. If the first two bytes are "MZ" it will select "EXE mode" otherwise "COM mode".
COM files contain a single segment of code+data. The DOS authors directly reused the format from CP/M. The loader allocates a single segment of memory, then loads the com file at address 0x100, and transfers control there. So the first byte of the file contains the first instruction.
EXE files in contrast have a header that define multiple segments worth of code + data, and some environment variables. DOS allocates memory for each segment, possibly in a different order and positions on every system, loads the segment's contents from the EXE file, and then modifies each code segment to adapt to the actual locations of the other segments (that process is called relocation).