I am not a canon lawyer, so my response may require correction. But, here is my own understanding of these things, for what it’s worth.
Excommunication is one of three types of “censure” or penalties that a person in the Church can receive. The other two are suspension and interdict. To be excommunicated is to be no longer in communion with the Church. The purpose is not to punish a person or to damn him to hell but to inform him that he has committed a serious act of separation from the Church and to compel him to repent and return to full communion.
An excommunication can be imposed upon a person in two ways. If the excommunication is ferendae sententiae, it is imposed by an ecclesiastical judge. If it is latae sententiae, then it is imposed automatically, as soon as the offense in question is performed.
What can a person be excommunicated for?
I do not know what the offenses are that would result in a ferendae sententiae excommunication. But, I can tell you that an automatic excommunication results from committing the following offenses:
- Apostasy from the faith
- Formal heresy
- Throwing away the consecrated species
- Taking away or keeping the consecrated species for a sacrilegious purpose
- Using physical force against the Roman Pontiff
- A priest, when he absolves his accomplice in a sin against the sixth commandment of the Decalogue, unless his accomplice is in danger of death.
- A bishop, when he consecrates someone a bishop without a pontifical mandate
- Receiving the previously mentioned consecration
- A confessor, when he directly violates the sacramental seal (divulges the content of a confession)
- Actually procuring a direct abortion
One should note that these instances are never as clear cut as they seem. If you are ever worried about your status in the Church or that of a loved one, consult a priest or canon lawyer. The following articles are also very helpful:
- Excommunication!: An Interview with Canon Lawyer Dr. Edward Peters
- Strong Medicine: Canon Law and Excommunication
- Apologetics and Canon Law
- Excommunication Is a Declaration of Acts that Sever Ties
- Excommunication: A Call to Grace