The Holy Spirit lives in us when we come to Christ and keeps us from temptation and thoughts that lead us to a life of sin. That why it is so important to stay in the word on a daily basis. It is spiritual protection that give us directions and causes us to remain on the straight and narrow path, through the guidance of the Holy Spirit.
To often we are bombarded with evil unwholesome thoughts that are not at all beneficial to our well being. When we are alienated from God we have no protection. No grounding that can keep us open and honest in the way we deal with sinful thought. That is why we are so open to attack. We must insulate ourselves from attack, by emerging ourselves in the word, as the Holy Spirit comes to live with us.. Not just on Sunday, but everyday of the week, we must be about meditation and studying of the word of God. That is our only hope.