In This World, Not of This World

We are to be in the world, but not of this world. How can we do that? We physically live here, but must avoid falling into the traps of this world.