Actually, string.h doesn't contain the functions themselves, it only contains the prototypes of those functions. The functions themselves reside in the library, and are linked to the program by the linker. But because those functions are being called before they are linked in, the compiler needs to know about them and the header files provide the basic information about them.
You can put anything in a header file that you want - it just gets typed out into your program by the pre-processor. For example, I could make a file called "myheader.h" and put this in it: Hello, my name is coderFoo! Then, I could put this line in my program:
and then that header file would be replaced by the phrase: Hello, my name is coderFoo! and of course it would cause an error from the compiler.
In other words, whatever is in the header file is simply typed out where it's at when you start to compile the program.
You can put function definitions in there if you want, but all of the standard library functions remain in the library until compile - link time, and only the function prototypes are in those header files.