Since excommunication has recently come up in the news, due to Cardinal Trujillo's recent claim that stem cell researchers doing work that involves destruction of embryos are subject to excommunication. Since misinformation starts flying around once anyone mentions excommunication, I thought I would say a few things.
(1) Cardinal Trujillo does not have the authority to issue binding interpretations of canon law on this issue. He is not 'the Vatican', merely the head of the Pontifical Council for the Family. As Edward Peters notes on his canon law blog, there's a fairly good chance that the Vatican will at some point back him up more officially on this point, because for the purposes of canon law just about any deliberate killing of an embryo or fetus is treated as an abortion; but it's worth noting that we should never conflate 'the Vatican' with just one or two cardinals.
(2) Being excommunicated doesn't mean being 'expelled from the Church'. Abstracting from a few details, excommunication typically involves the following punishment: not being allowed to celebrate or receive the sacraments. The punishment is what is usually called 'medicinal'; i.e., it isn't generally supposed to be given in order to punish anyone, but to correct them, which means that it is forward-looking: excommunication is imposed in order that it may be lifted at some future point. Thus excommunication doesn't 'expel you from the Church'; on the contrary, it presupposes that you may continue to be Christian in a state of excommunication. On the Catholic view it's baptism that makes you Christian; and a legitimate baptism can't be effaced by any penalty the Church may impose. What excommunication does is shut off the sacramental blessings of the Church, and those consolations associated with them, from the baptized.
(3) Excommunication is usually ferendae sententiae, i.e., no matter what you do you aren't excommunicated until someone actually excommunicates you. On very rare occasions (only about nine or so in canon law) it is latae sententiae, i.e., you excommunicate yourself simply by committing the offense. As it happens procurement of abortion (and being an accomplice in it) is by canon 1398 currently treated as a latae sententiae offense. (The provision is not by any means new; the 1917 code of canon law had a similar provision; and similar provisions go back to the sixteenth century.) What this means is that those who procure an abortion (or assist those who do) are automatically considered not to be in the spiritual state required for receiving the sacraments, and continue to be in such a state until they confess and atone for it properly. It is certainly this canon that Trujillo has in mind. As with all cases of canon law, there are exemptions, e.g., not being of sound mind or being younger than sixteen, and mitigations, e.g., being a minor who is sixteen or older.