Israel was a nation God created for himself. They were a holy people because they were different, set apart from all other people groups. God wanted them to stay that way. There were a number of things that made them different, separate, holy. For one, they were not to worship the gods of other nations or even have the likenesses of other gods in the country. They had an entire day out of seven in which they relaxed and did no work. When they came to the tabernacle to worship, they turned their backs to the sun--a deity for many peoples--and faced God and his dwelling place. They had rules about what they could and couldn't eat, what they could and couldn't wear, who they could and couldn't have sex with. There were rules about cleanliness, health and relationships.
God wanted his people to stay separate, different, holy and so he warned them sternly, "Do not let them (the people they were to drive out of Canaan) live in your land, or they will cause you to sin against me, because the worship of their gods will certainly be a snare to you." This in fact happened repeatedly throughout Israel's history. They embraced the peoples around them, married them and worshipped their gods. Time and again, God would allow those neighbouring nations to put them under subjection so they could see the difference between God's ways and their ways and, time and again, when the people repented, God sent them a deliverer.
As Christians, we are not a nation in the same sense that Israel was and yet God says through Peter, "But you are a chosen people, a royal priesthood, a holy nation, a people belonging to God, that you may declare the praises of him who called you out of darkness into his wonderful light." (1 Peter 2:9 NIV) There was no Christian nation at the time. The people who came to Jesus from all nations, were (and are) themselves a nation. As the next verse says, we are aliens and strangers in this world. We are a nation that covers the globe, that has no legal borders or government head, other than Jesus.
So, how does God's instruction to Israel apply to us? How do we keep those not of our nation from living in our land? How do we keep ourselves from turning to the ways of the nations around us and in which we are planted? How do we keep them from being a snare to us? How do we remain "a holy nation, a people belonging to God"?