The exact specifics aren't even known to moderators, and are in flux because this is a system that is constantly being tweaked as trolls and spammers try to work around it.
However, I can say that the post restrictions generally only apply to new accounts or those below a certain low reputation threshold. The folks at SE are well aware that legitimate users can share public-facing IP addresses with trolls or spammers and they care about collateral damage from any blocking mechanism.
Existing, established users don't have anything to worry about from a spam- or trolling-induced IP block on posting. Reputation and account age are reliable filters to indicate that someone is legitimate, so even having a network of spammers coming from your IP address probably won't impact your site experience. There can be cases where things like Tor nodes flood the site with traffic, at which point SE may hobble access for all users coming from there, but that's different than validated spam flags.
These IP bans are generally not permanent in any case, and age away over time. You might imagine that the length of this aging-away duration would scale with the amount of spam posts or spam accounts that had been identified at a particular location.
I believe these IP posting bans are imposed network-wide, because spammers hitting one site often try to hop over to others. Intelligence from multiple sites is aggregated.
Users are not blocked from viewing the site, except in the most extreme of circumstances (abusive scrapers, site attacks, etc.).