Then how does the whole "IP Ban" thing work?
Generally? Poorly.
You can ban ranges, but you risk alienating people who have done nothing wrong. IIRC, enworld currently bans all of North Korea (and maybe India) from signing up new accounts, for example, because of the amount of spam-style accounts.
You try to pick as narrow a range as possible that will still affect the targeted person. One way is to look at the record of IP addresses ever used by that person to post to the site and extract a rule from that.
The problem is there are quite a few ways to circumvent IP bans.
Luckily, most have inconveniences or costs in excess of the pleasure of continuing to interact with people that have banned you.