|That is either too simplistic or too broad or something else.
A library, any library, in any language, provides functionality defined by the library.
A library that provides a method that does math might provide a method that does a maximum of two numbers. It would do that because that is a mathematical operations.
A library that provides a method that returns the size of a file on the file system does that because the library does file system operations. And the size of a file is something that people like to know when the do stuff with the file system.
If you want to know how the maximum function is written then you
1. Learn math
2. Learn the programming language.
3. Code the function
If you want to know how to get the file size then
1. You learn exactly what that means (learn more about file systems.)
2. You will need to research core abilities in other libraries associated with the target file system.
3. Learn the programming language
4. Code the function.
Now you might want to know more about 3 in the prior case. You need to learn about the Microsoft (not .Net) Windows API. And then learn how C# interacts with libraries that are not other C# libraries.
If you want more information than that then it will require books (plural) to fully describe it.