Okay, this is a two fold question.

First part:

Lots of games, applications, compilers, etc., compile things into DLL's or Libs. For example, several standard header files code is mainly contained in libs, and several applications use dll's for storing data, using a library, etc. (ex. DX, OpenGL, and SDL all have DLL's).....

so, how do you compile code into either a lib or dll?

Second part:

how do you use the code that is in there, once it is in there?