You would ban bob's post from being shown on your instance's copy of the federated community.
This happened recently, where a prolific user on !noncredibledefence was instance banned on blahaj.zone. if you visited !noncredibledefence@shit.just.works from blahaj.zone, none of his posts would be shown, but they were otherwise visible on other instances. I suspect in the case you're talking about, it would only apply to the community on question and bob's posts in other communities would be unaffected.
If I ban bob, I can still see his comment. I'm logged into my instance with my mod account, and I'm viewing the discussion.. he has a banned icon next to his name, but I can still see it
Think of it this way. All bans and content removals are local only, and don't federate to other instances, with a few exceptions
The most notable of these exceptions are
i) a community moderator removing content or banning a user from their community. This federates. An instance admin doing the same thing does not federate, unless the community was created on their instance.
ii) an instance admin banning a user based on their instance, and choosing to remove all of their content. This will federate the ban and the content removal to other instances.