When you go to a website, you send it your IP address so it knows where to send the webpages back to. It's a trivial matter to keep track of those IP addresses so that forum officials can use them to track (and ban) users.
Since IP addresses are controlled by a central authority (IANA), if you know an IP address, you can find out which ISP owns that address, and sometimes the general geographic location of that address. It's similar to how you can look up a Zip code to get an approximate street address. But since IP addresses aren't required to be tied to a certain physical location, it's far from accurate.
For example, most ISPs assign dynamic IP addresses, so the IP address that you have today could be used by someone else tomorrow. You could be using dozens or hundreds of IP addresses without knowing it. Mods can block entire blocks of IP addresses to deny one person access, but the cost is that it locks out dozens or hundreds of other potential users.
As smaller ISPs get bought out by larger ISPs, ownership of more and more IP addresses are falling into the hands of large multinational corporations. That means that a block of IP addresses that were originally registered to a local Chicago ISP could be used by the larger ISP that bought out the Chicago ISP in another location, like Boston. In other words, the accuracy of determining your physical location by your IP address is decreasing.