Shortly, you can think a header as the interface to a library, with no implementation, just with the function signature that you can call in your program. When this function is called by the program the compiler links to the source code in the library.
You can have lots of libraries that implements only one header file, i.e., stdio.h is the header file and glibc AND uclibc are libraries with all stdio.h functions implementation with differences between them.
I don't know if it would be important to you now, but it's important to know: libraries can be statically-linked or dynamically-linked, where the first one stands for a library that is copied into your final executable and is loaded into the memory all with your program just as one program, and only this program will use this copy. The second is linked outside the program at some point of memory where every program that uses this library will search for and execute the source.
Statically-linked is faster than dynamically because the program doesn't need look for the library in another block of memory and load it, but your final executable would be much larger.