Have you encountered such time that you know that it is wrong, but still you did it? We may be aware about what is right but wrong, but our flesh is really weak. And, our heart is also deceitful and desperately wicked (Jer. 17:9). We have to fight against these ungodly things. How?
Keep watch and pray, so that you will not give in to temptation. For the spirit is willing, but the body is weak (Mark 14:38). Stand firm on your faith. It takes a matured person with strong faith and conviction in the Lord to resist temptations. Be rooted in His Word and call upon His Name always.
You can do it, my brothers and sisters in Christ. "Read your Bible, pray everyday, and you will grow", as an old children hymn said. Once you are rooted in His Word, you can just handle temptations very well. You now know how to combat it, with the help and grace of God.