Our struggles with sin will only be over when we die and go to be with Christ in heaven. Only then will we be perfect, and only then will we be free from the temptations and weaknesses that assail us every day.
Why is this? After all, when we give our lives to Christ, doesn't God come to live within us by His Holy Spirit so we can overcome sin and become more like Christ? Yes - but our old sinful nature still lives within us - and this sets the stage for continued conflict. The Bible puts it this way: "The sinful nature desires what is contrary to the Spirit, and the Spirit what is contrary to the sinful nature. They are in conflict with each other, so that you do not do what you want" (Galatians 5:17).
But don't let this discourage you. Remember: You no longer fight the battle alone! When temptation comes, turn to Christ and commit it to Him. Ask Him also to help you avoid situations that might cause you to do wrong. The Bible says, "God is faithful; he will not let you be tempted beyond what you can bear. But... he will also provide a way out" (1 Corinthians 10:13).
When you do sin, face it honestly and seek God's forgiveness immediately. Then ask Him to help you learn from that experience, and to avoid situations like it in the future. Most of all, thank Him that some day we will be perfect - when we see Christ.