and frankly, how to do it. i don't know anything about it, but I know winsock library, a sample code would be very useful
Well, to be able to help people usually need to understand the problem.
E.g. if someone asks something like "I tried to build a house, but I couldn't, can you help me". Building a house (or application) is a complex process, many steps could go wrong, people generally don't like to waste the time on explaining something just to get an answer "Yes, I know that, but my problem is not there". For example I can't read your mind, I can't guess what problem you have, I don't have all the context that you've already built in your mind around this problem, and you provided very little information about it, but I can try to guess.
So, from what I understood, you got some source code, but it didn't work as intended (I assume it compiled?), so you want to learn how other programmers would approach such a situation with someone elses code?
Usually such projects have some discord servers or other ways for communication between developers who work with them. So as a first step I would recommend to find a community around the library you found, or some generic community of people who develop bots for Minecraft, if such exists. And of course any sources of documentation, Minecraft community is usually good at documenting things, so there's a good chance there are some pieces of documentation/articles/posts about writing bots.
And if that doesn't work, you can try to invest time investigating and debugging the code, but this is not something one can describe in a short message.