A linker is a program that combines object files and libraries into a single executable file. It performs two main tasks - symbol resolution and relocation. Linking can occur at compile time (static linking), load time, or run time (dynamic linking). Static linking embeds library code into the executable, increasing its size, while dynamic linking uses shared libraries that can be loaded at runtime, reducing executable size.