I have always wondered what a DLL is, I read up on it a little bit and it said that it was a file that contains code to be executed, but it's not in the main program. so what would I ever use a DLL for ? so could I make a program and then put functions in the DLL for the program to execute ?
That's pretty much it. DLL stands for dynamically linked library, which means it's a library of functions that's separate from your main program and uh, dynamically linked at load time. There's also static library files, .lib, which have their functions linked into your program at compile time and require no separate file.
DLLs are good if you have multiple executable files in a project that all rely on the same set of functions. You can just have them all utilize the same DLL file, and include it with the program.
Static libraries can be handy if you have some general purpose functions you may wish to reuse in other programs, but don't want to copy/paste the entire code for them into a new project -- just link to the .lib in the project and #include the .h file that goes with it. Any relevant functions you use from the library will be linked into the program at compile time.
They both have their places, and both can be used to distribute functions and code that are usable by programmers, but without distributing the actual source code. (Both static libraries and DLL files are already compiled, the only thing you need to use the code inside them is an appropriate header file)