How to refrain from sins

Condition:
How do I keep away from sins

Answer 

One of the many ways is to stay away from the causes of the sin. Anything that can lead to the sin, must also be totally avoided!

Another is to develop taqwa, the fear of Allaah Jallajalaaluhu! This will be achieved by thinking of the life of the Aakhirat, the zhikr of Allaah Jallajalaaluhu and the company of the righteous and pious!