In one sense, it means that you are ineligible to receive the sacraments, and if you do receive them, they are invalid. This would be the case for someone with un-confessed sins, including heresy, or using birth control for that matter.
In another sense, it is the formal finding of excommunication by the church authorities. That's where a person is supposed to be banished from society.
I don't think that Galileo was ever excommunicated. Feyerabend claimed that the church fathers chose a wording in their finding that stopped one step short of accusing Galileo of heresy (for which they would have had to torture and murder him).