We have our ways. Seriously, we're not going to talk about the tools we have for stuff like this, because that would allow people to more easily work around them.
Beyond tools, the user referenced there has a pretty obvious style that's easy to identify, as do many common trolls or spammers. Community members can pick these people up right away.
Let me respond specifically to your last point:
In my country we don't have dedicated IPs, so lets say some other user happens to have my IP, he trolls on SO, you block him, you'll be blocking me. It happened to me many times, some user with my IP was blocked on pastbin.com, I was blocked too, for like 5 months, untill my ISP decided to change my IP.
We fully recognize the problems that IP bans can cause. We have many, many IPs that 50+ people connect or have connected from, some with many hundreds of users. IP bans are only used in the most extreme of circumstances, and only when collateral damage would be at a minimum. In all cases I've seen so far, the ban was employed when the only users connecting from a given address were spammers or trolls, and no legitimate users came through there.
IP bans aren't thrown around willy-nilly, but are carefully considered before being put into place.