Excommunication is when the Catholic Church decides a person is not allowed to be part of the Church anymore. It is like when a teacher might send a student out of the classroom when they misbehave.
The reasons for excommunication can vary, but usually it is because the person has done something very bad that goes against what the Church believes is right. For example, if someone was to hurt or kill someone else, or commit a sin that the Church thinks is really bad like committing adultery or getting an abortion.
When someone is excommunicated, they are not allowed to go to Church, receive the sacraments, or pray with other Catholics. They are basically cut off from the Church until they change their ways and ask to be let back in.
Excommunication is a very serious punishment in the Catholic Church and is only used in very extreme cases. The Church wants people to behave in a way that is loving and respectful to others, and when someone breaks those rules they may be excommunicated as a way to encourage them to change their ways.