It's important, that in your heart and mind, you make a commitment to God, that you will not live in sin; you will not practice sin. As Christ Jesus walked upon the earth in true righteousness and holiness, so will you. When temptation comes your way, and the Holy Spirit makes you aware of it, remember who you are (God's child, a Christian) and cast it aside; just say, "No, I will not practice sin!" And immediately ask God to forgive you of the sin in your heart, and to protect you from it; He will, if you truly want Him to do so.1
Temptation does not become sin until you receive it into your heart (take ownership of it) and given the opportunity, would act upon it. If it persists, ignore it; eventually it will go away. Remember what the Bible says: “ In the same way, count yourselves dead to sin but alive to God in Christ Jesus. Therefore do not let sin reign in your mortal body so that you obey its evil desires. Do not offer the parts of your body to sin, as instruments of wickedness, but rather offer yourselves to God, as those who have been brought from death to life; and offer the parts of your body to Him as instruments of righteousness. For sin shall not be your master, because you are not under law, but under grace.”2
Always be aware that temptation has a way of enticing you one step at a time. Don't even take the first step, for if you do, you will be enticed to take the second step and before you know it, sin will be full blown. Stay completely away from situations in life that consistently entice you into sin; be wise in this area.
Remember, because of the sinful nature we are all born with, we will never be above temptation; we will never be free from it in this life. God’s children however, through the indwelling Holy Spirit, have the power to say No! We should not live in sin; we should not practice it. We should consider ourselves dead to sin but alive to God in Christ Jesus.3
1 (1 John 2:6, 3:1-10, 1:9; 2 Thessalonians 3:3-5)
2 (James 1:14-15; Romans 6:11-14 NIV)
3 (1 John 3:4-10; Romans 6,7,8)