Ridonks explained the how quite nicely.
For he preventive cure:
1) Self-Purification and fear of God and awareness of the Akhirah. By constantly seeking forgiveness, being truly deeply afraid of God and God alone, and knowing that Heaven/Jannah/Promised Land is far, far, far, far, far superior to ANY and ALL pleasures this temporary world has to offer and certainly worth the sacrifice of restraining anger/lusts and by knowing that Hell is far, far, far, far, far, far, far, far more painful than the pleasures whatever vice reaps, one can simply say no.
2) Reciting the Word of God and seeking refuge in God.
Something to explain Satan:
Man MUST REALIZE his greatest enemy are the following.
1) Satan. Satan ONLY WANTS MAN TO BURN IN HELL FOREVER from his envy of being replaced by Adam. It is a malicious unending vengeance. And Satan will prey upon man's weaknesses.
2) His own NAFS/pride. Man's appetite when uncontrolled will beckon him forth to wanting everything, banging everything, eating everything, owning everything, ruling everything. It must be kept in check and Man must remember that he was created to worship God and be just.
3) The AntiChrist/Dajjal/False Messiah. A creature that
Man must realize that person telling him not to do such and such is NOT TRYING TO CONTROL HIM the intention behind it is saving from going down the wrong road. Likewise man must understand that guy beckoning him to do something fun and escapey is just slowly leading him to destruction.
Always turn to God, gentlemen.
No one loves you guys more than God. Not even your mothers.