gZany A library is a piece of code providing useful functions. The point of it is one of two things:
The library contains code which, to avoid copy+pasting into your project (can be messy, and takes a while to re-type), you import, making the code neater (i.e. HTTP or [WUT] Deluxe). It also avoids you having to rewrite all of your functions, because you only need to have the library ID on hand, go to "Add libraries," enter it, and click "Add." Often it gives useful functions (HTTP requests or smooth UI respectively). As a bonus, the creator gets credit, unless you're one of those people who like stealing others' works and calling it your own. Trust me, I've seen this a lot with Vault.
Libraries run before the main code and cannot be stopped without external JS, which is very useful for security libraries (i.e. Vault). These usually do not contain additional functions (though Vault comes with remix protection), because a good security library (Sam...) will run on its own.
To make your own library, just create a new project, put in your functions (making sure there is a comment above each one), and when you're done, click "Share," click "Advanced Options," and "Export as library." Follow the instructions, copy the ID, and use it! Maybe add some credit, as well, along with the library's ID in the library itself, so others can use it.