Of course. You can read the protocol specification and/or study the source code of the existing libraries and clients to figure out how they work.
I think a reasonable first step is learning about B-encoding so that you can parse and generate torrent files.