A dll is produced by compiling source code into object code then linking it into machine code and writing that to the dll file.
A dll is similar to an exe but is not directly executable. Functions in the dll are called from the main exe. It provides a way to split what would be a very large exe into an exe plus one or more dlls.

