Its very basically a file that contains data. When you run a program the program asks the computer for the data that is contained in the dll file and were to find it. Every time you load a new program it loads a number of dll files for it to use, not every program needs them incidentally. The location of the dll file is unimportant, as long as the program that uses it knows were to find it, this is why quite often they are duplicated all over the computer.
There are programs that you can run that will check if a program is asking for the dll, if it isn't it will mark it for deletion. You haven't mentioned what operating system you are using, but if you do someone will probably point you to such a program.