You need a library that does something. Here's what happens:-
1. Start writing a library, e.g. a networking library for a game.
2. Use Google and ask for help online when there's invariably a problem to solve.
3. Most people suggest using an existing library.
4. Start using an existing library.
5. Realise that this library either has a bug in it, or isn't straightforward to use.
7. Use Google and ask for help online when there's invariably a problem to solve.
8. Decide it's hard work using someone else's code, so start to write your own library.
9. Start again from 1.