Firstly, in the world of programming, a library means the collection of helpful codes, brought together for using again later. These libraries have proper defined interface, that facilitates the functions that it is designed for. It is generally developed in a way that you have to work less or use of lesser codes to complete the same task.
For instance, if you want to create a program which can save data at few points in the hard drive. A developer can write the complete code which is a lot of meticulous work or you can take help of libraries, that is already created, this will ease your work to greater extent.
Writing the complete code that will enable data saving on your hard drive is quite a complex task and you will need to have the knowledge about low-level programming. Instead, if you can take help of library that has the codes for the same prepared by someone else, you can implement it to your program.