Excommunication is the action of the Christian church administered upon a Church member who has refused to repent of his sin and/or who has refused to recant of heretical teaching. This action is the final step of a formal and public removal of the person from the Christian church where the Lord's Supper (Communion) is denied to the person and where pronouncement that the person is not a member of the body of Christ. In other words, it is the process where the Christian church publically proclaims that an individual is not a Christian and is kicked out of the church since the person is remaining in a state of non-repentance.
This does not mean, though, that the person is not welcome in the church, for the purpose of this discipline is to bring the person into repentance and reconciliation with God and God's people.
The proper steps preceding excommunication are as follows:
Matt. 18:15-18 "And if your brother sins, go and reprove him in private; if he listens to you, you have won your brother. 16 But if he does not listen to you, take one or two more with you, so that by the mouth of two or three witnesses every fact may be confirmed. 17 And if he refuses to listen to them, tell it to the church; and if he refuses to listen even to the church, let him be to you as a Gentile and a tax-gatherer. 18 Truly I say to you, whatever you shall bind on earth shall be bound in heaven; and whatever you loose on earth shall be loosed in heaven."
So, the proper steps preceding excommunication are going to the person in private, then with two or more witnesses, and then a proclamation to the church if he will not repent. The elders of the church should be involved in this process.