In the Lord's prayer, Jesus teaches us to pray, "lead us not into temptation, but deliver us from evil." In Matthew 26:41 he teaches His disciples, "Pray that you might not enter into temptation."
The prayer is not that we might avoid the possibility of ever being tempted, but that we might not "enter into" the moment of temptation when it comes. By the time we have "entered into" it is already too late! Being tempted is not a sin, as even Jesus was tempted, but the problem is one of being vulnerable to temptation. If we have a weakness and are vulnerable to temptation in a certain area, then we have already "entered into it," in the sense that the only thing that is preventing us from falling into sin is the opportunity. Jesus said that the devil had "nothing in Him." The key to overcoming sin and temptation is to have nothing in us that the devil can draw upon. We must pray and by the Spirit "put to death the deeds of the flesh," so that in the hour of temptation the devil has nothing in us and we do not enter into it. But as soon as we feel the pull of the flesh it is already too late - we are powerless to resist because he has something in us that we respond to.
The reason we pray then is not to avoid the opportunity of temptation that this world affords us, for it will surely come, but to make sure we are filled with the Spirit and preclude any possibility of entering into the moment of temptation when it presents itself. Giving in to temptation is simply a sign of prayerlessness.
"Pray that you might not enter into temptation, the spirit is willing but the flesh is weak." (Matthew 26:41) In the second half of this verse Jesus describes the reason for our condition of vulnerability, "the spirit is willing but the flesh is weak." The spirit is predisposed, (towards righteousness) but the flesh is powerless (strengthless).
In Romans 6 - 8 Paul describes his dilemma in the battle against sin, and cries out, "Who will deliver me!" And then he says, "thanks be to God through our Lord Jesus Christ!" Jesus paid the price for our deliverance, and then sent the Holy Spirit to aid us in our war against evil. The power to overcoming sin and temptation resides within us. They key, is to pray every day until we are filled afresh with the power of the Holy Spirit, and then to yield ourselves to Him moment by moment throughout the day. In this way, we will never "enter into" any moment of temptation, because when the evil one comes, there will be nothing in us but the nature of Christ.