In this passage, Paul gives an illustration of church discipline from an actual situation. In the first verse, Paul says that he has heard that there is sexual immorality among the Corinthians, and a kind that is not even committed by unbelievers. This sin is incest. Paul then rebukes the church because they have become proud of keeping the sinning church member in fellowship with them.
Therefore, in verse 3, Paul says that he has determined to command the Corinthians to tell the sinning church member that he is no longer allowed to have fellowship with them. This is, in effect, giving the sinning person to Satan, so that his evil human nature will be destroyed, and he will be saved on the day of judgment.
In verse 6, Paul directly tells the Corinthians that their boasting about the situation is not good. The reason that it is not good is that it is like yeast in a lump of dough, which spreads throughout the entire piece of dough. Therefore, Paul commands them to clean out the yeast of the sinning member, so they may be a new lump of unleavened dough. The reason for this is that Christ, the fulfillment of the Passover lamb, has been sacrificed. As a result, Christians can celebrate a sort of Passover feast with unleavened bread, which represents sincerity and truth.
In verse 9, Paul references a letter that he wrote to the church, in which he commanded them not to associate with sexually immoral people. He tells them that he did not mean to avoid association with any sinning person, but only those who claim to be Christians, but are living in sin. This abstinence from association includes not sharing a meal with the unrepentant Christian. The reason that Christians are allowed to associate with non-Christians is that Christians only have a responsibility to sentence church members to excommunication. However, God is One who condemns unbelievers. Nonetheless, Paul concludes, the Corinthians must remove the sinning member from their fellowship.