The first requires a presence of mind to enter the void left behind by the thing, that people doing drugs probably lack, since they are, in essence, stimulation addicts. Drugs fill a void they avoid facing. Stopping doing drugs would cause them to face that void.
The second is more amenable, because you can taper off with replacement therapy. Switch to using less bad drugs, or indeed anything stimulating. Continuously replace the thing you're getting stimulation from with another, slightly less stimulating thing, until the thing that is left is sufficiently nonstimulating that stopping and accepting the void feels manageable.
I went from putting speed in my morning coffee to eating a pound of chocolate a day.