The key is, really, in the tracker. You connect to the tracker and get a list of peers that you can communicate with, these peers are generally opened up via NAT pinholes or UPnP, so it is just a matter of connecting to them (sometimes they are not, and generally this means you get a crap transfer rate because you have to piggy-back people who are not giving good upload, rather than getting as many people together as you like).
Then it is just TCP and keeping your files in chunks.
It looks more complex than it really is, just remember, tracker == list of IP's and ports.
Edit: Before anyone gets into me, yes it is a little more complex than that, especially when you get into networks that share lists around and the like, but this was meant to gist.