"The person who refuses to compromise under any and every circumstance is obstinate, unreasonable, and selfish. That sort of strong-willed inflexibility is sinful and has been the ruin of many relationships and organizations. But when it comes to matters of principle – moral and ethical foundations, biblical absolutes, the axioms of God’s Word, God’s clear commands, and the truthfulness of God Himself – it is never right to compromise." John MacArthur
A lot of people apply this verse with marriage, which is good in principle, but if you look at the entire chapter, Paul is not talking about marriage. He was addressing the believers in Corinth that were teaming up with pagans and unbelievers and attempting to worship God.
Do not be unequally yoked with unbelievers. For what partnership has righteousness with lawlessness? Or what fellowship has light with darkness? What accord has Christ with Belial? Or what portion does a believer share with an unbeliever? What agreement has the temple of God with idols? For we are the temple of the living God; as God said, “I will make my dwelling among them and walk among them, and I will be their God, and they shall be my people. Therefore go out from their midst, and be separate from them, says the Lord, and touch no unclean thing; then I will welcome you, and I will be a father to you, and you shall be sons and daughters to me, says the Lord Almighty.” 2 Corinthians 6:14-18