TL;DR Asks for the packets in the torrent in order and sends them to the client, caching the location of the peers for future use
Do you have a non tl;dr version, this is HN, we do like to read here.
How does it not get the ip?
Well, it's a torrent client that uses some specific trackers instead of using dht for the swarm, after he gets the peers he requests the packets in order that are send to a stream, that stream is sent to anyone that requests it.