A linker combines various code and data sections into a single file to execute, resolving symbolic references and addresses. A loader, on the other hand, loads this executable file into memory, preparing it for actual execution by the computer.