A compiler translates source code into object code, which is stored in object files (.obj on Windows, .o on Unix-like systems). These object files contain machine code but may not be fully linked - they may reference external symbols that the linker will resolve. The .exe file is produced by the linker, not the compiler.