There are a few actions which, by canon law, cause a lay person to be excommunicated in and of themselves:
- public declaration (usually repeatedly and by a prominent figure) that one rejects the Church. Technically this is known as apostasy. (Canon 1364)
- public rejection of the authority of the pope over the Church, known as schism. (Canon 1364)
- public rejection of some teaching which the Church requires to be believed, after being corrected by one's pastor or bishop, or by the pope. This is called heresy. (Canon 1364)
- assaulting the pope or another bishop (canon 1370)
- trying to consecrate the Eucharist (canon 1378)
- falsely accusing a priest of trying to absolve someone he's had an affair with (canon 1390)
- procuring (that is, arranging for, or possibly conducting) an abortion (canon 1398)
None of these appear to have applied to Madonna (although perhaps one of the first three might).
There are a number of other possible actions for which canon law prescribes that the offender is to be "punished with a just penalty". This just penalty can include excommunication. Of all of these possible actions, the only one I can think of that might apply is
A person who in a public show or speech, in published writing, or in other uses of the instruments of social communication utters blasphemy, gravely injures good morals, expresses insults [against] or excites hatred or contempt against religion or the Church is to be punished with a just penalty.
It is possible that an official of the Catholic Church felt that some of Madonna's statements about the Church fit into this category. Wikipedia, for example, states "The ... music video [for Madonna's song "Like a Prayer"] featured many Catholic symbols such as stigmata and cross burning, and a dream of making love to a saint, leading the Vatican to condemn the video."
Typically an excommunication comes from one's ordinary: the head of the diocese in which Madonna lives. I'm not precisely sure of the timeline of Madonna's moves, but this would probably have been Terence Cardinal Cooke, archbishop of New York 1968–1983; Joseph Cardinal O'Connor, archbishop of New York 1984–2000; Roger Cardinal Mahony, archbishop of Los Angeles 1985–2011; or possibly Manuel José Macário do Nascimento Clemente, archbishop of the Latin Patriarchate of Lisbon since 2013. It would be very rare indeed for the Vatican to excommunicate someone.
I can't find any reference to Madonna's excommunications that doesn't come from her, and there are a few statements of canon law that indicate it is probably not the case.
Once a person is excommunicated, a further excommunication is of no effect unless the person has repented, confessed, and had the excommunication listed. (An excommunication is more or less a temporary ban on receiving the sacraments (canon 1331)—it makes no sense to try and "multiply it".) Thus, if Madonna has indeed been excommunicated three times, she's had the excommunicated lifted at least twice. One would think that if this were the case, she would have mentioned it in the discussion. Furthermore, one cannot be excommunicated, per canon 1323, if one isn't aware that one is committing an act punishable by excommunication.
All things considered, then, in the absence of positive evidence that this is so, it probably isn't. Why then is she claiming it is so? It might be that she is trying to stir up animus against the Church; it could be that she is seeking notoriety; perhaps she is confused about what constitutes an excommunication and how it is handed down. Without more information (from her) it's impossible to tell.