Sin is the only thing that separates us from God. - And there are some ways that we can stay out of it.
1) We have to remember to make God's word a part of our life. God has given us the wonderful blessing of being able to look to His word whenever we want. Unfortunately, we don't do it as much as we should. His Word has the answer to every problem that we could possibly encounter in our life - and we need to take advantage of being able to study it.
2) We have to remember the danger of flirting with sin. In addition to that, we need to remember that God is always watching us. Sometimes we do things because we feel God can't see us... When you're tempted to sin, do you think about the fact that God knows and will see what you're about to do?
3) We have to remember that sin carries a price. Sin can do bad things to us - it can wound us. It carries a price even when it doesn't destroy us. Just because our actions don't have immediate consequences, doesn't mean they're going unnoticed by the Lord.
Try your hardest to follow these steps in order to resist sin in your life. We'll feel much better after we resist temptation than how we would have felt if we had given into it.