I wrote to you in my epistle not to keep company with sexually immoral people. Yet I certainly did not mean with the sexually immoral people of this world, or with the covetous, or extortioners, oridolaters, since then you would need to go out of the world. But now I have written to you not to keep company with anyone named a brother, who is sexually immoral, or covetous, or an idolater, or a reviler, or a drunkard, or an extortioner - not even to eat with such a person. For what have I to do with judging those also who are outside? Do you not judge those who are inside? But those who are outside God judges. Therefore "put away from yourselves the evil person." I Cor. 5:9-13
Don't keep company with the immoral people in your church. Kick them out of your fellowship. Don't judge people outside your church
this way, though. If you do, then you'll have to go out of the world entirely.
It's all about a specific action: excommunication / disfellowship / separation.