The phrase, derived in part from John 17, that believers need to be "in the world but not of it" is often used, but perhaps certain of its nuances bear further scrutiny.
What does it mean for Christians to be in the world but not of the world?
First, believers need to be "in the world." It could be taken for granted that believers are in the world; we reside on Earth, after all. However, being in the world implies more than simply inhabiting it. We need to actually be involved in our societies. Jesus told His disciples to "go therefore and make disciples of all nations" (Matthew 28:19). They were not to set themselves up apart from the world and expect others to come to them to hear truth. They were told to "go." Similarly, in John 17:15 Jesus prayed regarding His disciples, "I do not ask that you take them out of the world, but that you keep them from the evil one." His disciples needed to stay in the world, not be removed to heaven. Acts 1:8 and Isaiah 43:10 tell us that we are to be witnesses to the world. Matthew 5:16 tells us that our light is to shine before others to point them to God. Allowing our light to shine requires us to be around people. There are certain Christian sects (such as the Amish) who believe in a "Christ apart from culture" model of evangelism; however, such separation is not the biblical norm.
To be "not of the world" requires us to be free of worldly influence. This does not mean that we do not participate in government or typical social processes. It means that we do not act as the unsaved world does. We are not slaves to our sinful natures but act in accordance with righteousness (Romans 6:6, 11). We are told to put to death things that are of our sinful natures and to flee from immorality (Colossians 3:5-10; 1 Corinthians 6:18; Galatians 5:16-24; Ephesians 5:3-11). We "train [ourselves] for godliness" (1 Timothy 4:7); we are "imitators of God" (Ephesians 5:1); we have nothing to do with "unfruitful works of darkness, but instead expose them" (Ephesians 5:11). We submit to authorities and prepare ourselves for good works (Titus 3:1). In essence, we act according to the new nature we have been given rather than the sinful nature of the world (2 Corinthians 5:17, 21; Titus 3:3-8). "We are ambassadors for Christ" (2 Corinthians 5:20), spreading His fragrance (2 Corinthians 2:15-16) through the world.
First Peter 2:9 says, "But you are a chosen race, a royal priesthood, a holy nation, a people for his own possession, that you may proclaim the excellencies of him who called you out of darkness into his marvelous light." We live in a world of darkness, but we are not part of that darkness. We are not of the world because we are in Christ; we have the light. And while we are still in the world, we are called to be set apart, to shine the light that others might know Him and be saved (Matthew 5:13-16).
How are Christians not of this world?
Is there such a thing as a carnal Christian?
Is entire sanctification possible? Can Christians achieve sinless perfection in this life?
Religiosity - What is it?
How important is spiritual growth in Christian life?
Truth about the Christian Life