Because it's impossible to completely steer clear of temptation locations, there will be times when you will be dead smack in the middle of Satan's grasp and you will have to learn to deal with them. Many people freeze up when they get caught in temptation situations because they don't know what to do in order to come out on top. In order for you to be able to deal with temptation, you need to use the three techniques of temptation evasion: realization, preparation, and quotation.
The first technique of temptation evasion is to come to the realization that by being in a location where temptation is inevitable, you are putting yourself at a high risk of sinning. In Genesis 27 we read of Jacob in a temptation situation that was set up by his mother. Jacob's mom overheard Isaac telling Esau that he was going to bless him before he died so she told Jacob to trick his father Isaac into thinking he was Esau. Let's see what Jacob's initial response was in Genesis 27:11-13:
Jacob said to Rebekah his mother, "But my brother Esau is a hairy man, and I'm a man with smooth skin. What if my father touches me? I would appear to be tricking him and would bring down a curse on myself rather than a blessing." His mother said to him, "My son, let the curse fall on me. Just do what I say; go and get them for me."As you can see, Jacob came to the realization that he was being tempted by his mother. If Jacob would have just acted upon his realization then he would not have fallen to the temptation. As a Christian, the Holy Spirit will help you determine what is right and wrong, but it is up to us to do what is right. Some fall into temptation but choose not to realize it; they do this either because they don't want to, or they are not knowledgeable of the morals God wants us to maintain.
I know a lot of people who claim to be Christians but hang around with people that heavily tempt them. They continue hanging out with them even though the situations are hazardous to their spiritual health. If we, as Christians, don't acknowledge that we are in a situation where we are being tempted, then we won't even make an effort to choose what is right.
Preparation for temptation situations is the best way to conquer them. It is always much easier to fall into temptation when the decision of whether or not to do it is in its midst. You will be more likely to defeat temptation if you decide now whether or not you will go through with a temptation when it comes about. The earlier you decide that you aren't going to do something, the easier it is to actually stand by your decision. Another way to be prepared for temptation is to be in constant prayer with God. Ask Him to watch over you as you go throughout your day just like it says in the Lord's prayer (Matthew 6:13)
The final technique of temptation evasion is quotation of the scriptures. In Matthew 4:1-11 we read of Jesus being tempted by Satan. Three times Satan tried his best to cause Jesus to stumble, yet each time Jesus replied with a quotation of scripture. Satan could not stand up against the truth of the Bible (Psalm 33:4, Psalm 48:14, John 1:17) and he eventually left Jesus. The same is true for us when we are in temptation situations. Satan will do his best to cause us to stumble but when we show him the truth of God's word, he will not be able to compete.
By using these techniques, you will be able to confidently and more frequently overcome temptation situations. By your realization of temptation, preparation for it, and quotation of scriptures during it, you will be better equipped to use the strength that God provides in your times of need.