Back in 1988, I read a book called Discipline and Discovery by Albert E. Day. He offered six steps to purity which he discussed in some detail. I summarized his ideas and wrote them on one of the blank pages in the front of my Bible. They were such good reminders that I transferred them to the next four Bibles I owned. Here they are.
First: Avoid anything which lowers your inhibitions. It doesn't matter whether that is a substance, a place, a situation, or a person. Avoid anything which entices you to act in a manner you should not.
Second: Set a watch on the door of your eyes. One of the examples I remember tied to this one was King David as he watched Bathsheba. The first time he saw her was an accident (wrong place, wrong time) but he continued to return to watch her bathe.
Third: Guard your imagination. Thinking about how situations might develop to put you into a particular situation opens a floodgate of thoughts over which your inhibitions have little control.
Fourth: Do not run toward temptation. Scripture tells us to avoid temptation, to "resist the Devil". Instead we sometimes head toward temptation instead of turning away. It's what mothers used to call the "bad boy syndrome" when Christian girls were attracted to boys who were obviously not engaged in living for the Lord.
Fifth: Restrain your indulgent curiousity. No sin can ever gain control if we do not "try it just once." I can remember, as a young person, being told that there were untold thousands of potential alchoholics who had never drank even once. But, I was told, had they ever "tried it just once," they would have had difficulty resisting further use.
Lastly: Let your thoughts dwell on what TO DO, not what you should not do. For many years (despite Philippians 4:8), I did not understand this. Then, as I trained to be a teacher, we learned that making rules in the positive (that is: the expected behavior) made it much more likely they would not be broken.
"Finally, brothers, whatever is true, whatever is honorable, whatever is just, whatever is pure, whatever is lovely, whatever is commendable--if there is any moral excellence and if there is any praise--dwell on these things."