Educate yourself about addiction and the resources available for treatment.
Listen without judgement and let them know that you care about them and support them.
Help them find and attend support groups, such as Alcoholics Anonymous or Narcotics Anonymous.
Encourage them to seek professional help from a therapist, counselor, detox, or treatment center.
Support them in their efforts to maintain sobriety by being a positive influence and helping them avoid triggers and high-risk situations.
Note: Remember to take care of yourself as well, try to be realistic about your own abilities and limits as a friend to help. And also be aware that ultimately, the decision to change and overcome addiction is up to the person themselves and they have to be willing to seek help.