Lets suppose you have written a program and saved it by name "program1.cpp" When you compile this program, compiler creates object code of program "program1.obj "and stores it on disk. Linker links libraries with that object code and its becomes "program1.lib". Loader picks that lib. file and loads it into memory. From memory, CPU takes and executes program.