According to Matt 18:15-17, if we observe a person who claims to be a brother, yet whose behavior is immoral and sinful, we should privately and gently confront this person with the truth of their sin, and seek to restore them to Christ through repentance.
Brethren, if a man is overtaken in any trespass, you who are spiritual restore such a one in a spirit of gentleness, considering yourself lest you also be tempted”l 6:1). If they refuse to hear us in the matter, we should make another attempt with the assistance of one or two more Christians. Still, if there is no satisfactory response, we should then tell it to the church. And finally, if the restorative attempts of the church and it’s authorities are further rejected, we are no longer to esteem them as a brother (Matt 18:15-17).
When such repetitive efforts to restore a fallen brother are met by the absence of genuine repentance (turning away from sin), the church is left with a sad and unpleasant task — to excommunicate the individual, as described in 1 Corinthians chapter 5. In this particular case, a man in the church of Corinth was persisting in a matter of sexual immorality (with his father’s wife), and Paul told the leaders that such continued sin by a professing believer was not to be tolerated within the church. He told them, “In the name of our Lord Jesus Christ, when you are gathered together, along with my spirit, with the power of our Lord Jesus Christ, deliver such a one to Satan for the destruction of the flesh, that his spirit may be saved in the day of the Lord Jesus” (1 Cor. 5:4-5).
To implement this action, it appears that the church publicly dismissed the man from the church fellowship, as Paul said to “...put away from yourselves that wicked person” (1 Cor. 5:13). It appears that expulsion was intended to remove this individual from the protective environment of the church, exposing him to the harsh reality of the Holy Spirit’s absence — thus turning him over to Satan’s world of darkness and torments. Some suggest that “destruction of the flesh” may mean a visitation of a physical affliction or even death.
The Purpose of Excommunication
Nevertheless, the purpose of turning a person over to Satan is not merely punitive, but for the same familiar objectives:
(1)
Restoration - God’s desire is, and always will be, to reconcile the sinner back to Himself. “...that his spirit may be saved in the day of the Lord Jesus...” (1 Cor 5:5). The hope is that when abandoned to the wages of sin, the inevitable loss of peace, and subjected to Satan’s torments, the rebellious soul will eventually seek repentance and restoration.
(2)
Protection - The unrepentant is removed from the church to protect the body from further infection by such sinful behavior. “...Do you not know that a little leaven leavens the whole lump?” (1 Cor 5:6). Paul reminds us that it is one thing to be among immoral people in the world, but it is not acceptable to fellowship with immoral people who profess to be Christians. “But now I have written to you not to keep company with anyone named a brother, who is a fornicator, or covetous, or an idolater, or a reviler, or a drunkard, or an extortioner; not even to eat with such a person” (1 Cor. 5:11). Persons in the church fellowship who resist correction and repentance in this type of immoral behavior, should be expelled. Furthermore, their dismissal is not a secret, but is made public so that Christians will no longer keep their company......
http://www.victorious.org/excomun.htm