This passage is sometimes misused to teach that we should separate from Christians who belong to denominations that have unsaved people in them. A problem here is that the people who believe this are sometimes caught in scandals when some of their own leaders are actually unsaved.
The previous verses show clearly that Paul is talking about separating from pagan temples. Genuine Christians were still fellowshipping with the false gods they had served before coming to Christ, and God's Word strictly forbids this practice. But to separate from saints who belong to Christian groups that don't meet our standards is contrary to the Biblical command that we are to have fervent charity among ourselves.