No temptation has overtaken you except what is common to mankind. And God is faithful; he will not let you be tempted beyond what you can bear. But when you are tempted, he will also provide a way out so that you can endure it.
– 1 Corinthians 10:13 (NIV)
The sinful person has a heart that is drawn towards wickedness. The redeemed person has a heart that desires to please God. To this person God gives the gift of the Holy Spirit; the Spirit takes up residence in them.
Not only is the Holy Spirit at work inside us, He is at work all around us, and even before us. He has already been everywhere we are to go, before we ever get there. In spiritual terms we call this omniscience—God is everywhere.
Put these two things together and we come to the powerful truth that Paul explains in these verses. When we find ourselves being tempted, there is something inside us, other than God, that wrestles with that temptation. God is always leading us closer to Himself and the truth. He never desires for you to live in disobedience to His moral law.
Because God is in you, and all around you, no matter the situation, if you will cooperate with the Spirit of God you can have victory over sin. You can live righteously before God; meaning, you can do the right thing. You do not have to choose to sin.