15 Moreover if thy brother shall trespass against thee, go and tell him his fault between thee and him alone: if he shall hear thee, thou hast gained thy brother.
16 But if he will not hear thee, then take with thee one or two more, that in the mouth of two or three witnesses every word may be established.
17 And if he shall neglect to hear them, tell it unto the church: but if he neglect to hear the church, let him be unto thee as an heathen man and a publican.
Matthew 18:15-17 (KJV)
My church refers to this as ex-communicated. And it does happen. If a church member refuses to change their sinful ways, and there is evidence. An example is.....a church member decided she was lesbian. And actually got married. The ministerial talked to her multiple times (before she was married already). And nothing was changing for her. So she got ex-communicated. If she should ever repent and change her way, she will be welcomed with open arms.
I personally am very happy with how my church deals with situations like this.