Torrenting works this way: you get a small .torrent file, in that file is a description a file/files and a number of checksums and a link to one or more trackers, the .torrent file gets opened by a torrentclient (program on your computer) that reads the info then connects to the tracker(s) and the tracker then informs it what other people (their IP that is) have parts of that file, your client then connects to those people and asks for the parts and once it got a few in return also shares those parts with other people that do not have it yet, and they got your IP from the tracker too, or it could be they are already connected since you try to get parts they already have.
So the program, the torrentclient is accessing your HD to send/receive parts over your network, and does so simultaneously with many people because the combined slow speed of each person makes for a doable speed.
Now the anti-p2p people try to discourage that, to do so they also connect to the tracker to get the IP's of people connected, but being connected isn't a crime so they need to get you to send them files as proof, now what peerblockers do is collect the IP's of organizations and people that aren't friendly and blocks those, then they cannot get parts of the file and so there is no proof.
Another trick the anti-p2p people do is trying to send lots of fake parts, but most torrentclients once a number of parts that failed the checksum have been noticed automatically block the offending IP themselves, at least during that session, so that is already solved largely, but they also try to send malformed stuff and lots of requests and all kinds of crap to make your torrentclient confused or choke trying to deal with it, that would also not reach the client if a peerblocker already blocks it all though.
Plus there are flaws in many operating systems and programs including ones other than torrentclients they can abuse to flood your system and make it unresponsive, and that would also help them since when your connection is superslow then torrenting or other sharing isn't fun and people then give up
That's it as far as torrenting is concerned, but of course there are also thousands of flawed programs and not updated operating systems out there and other nasty people are scanning for those to get into people's system (most often to make them into unwilling spam bots without them knowing), and that too can be reduced by blocking known IP's of baddies people learned about.
So the point is that just because you see IP's trying that doesn't mean they can get into your system even if the ports weren't blocked, you need an active program on your computer deliberately connecting, or a flaw in your software that lets them abuse it and install stuff, or often the abuse possible is only to flood your connections to make torrenting or other sharing a pain and so make you feel you are better of buying stuff legally.
Now to know what IP's to block, lists are compiled, and that's done by people that work at places where they have access to them, or by people noticing they are being flooded or attacked or scanned or sued etcetera, and by known published IP ranges of police/companies/governments, but the problem is that they can hire yet other people or even use regular home connections and constantly have new IP's, so the protection isn't foolproof, it just helps, and you can hope they go bother the next sucker rather than jumping through hoops to focus on you.