Yes, they do really work for many people. That said, "many people" means about 10% long-term -- but it is the only type of program that really shows any long-term success rate.
As for how they work for me (still do), they've helped me let go of the things I can't control in life and focus on my own spiritual health. My own 12-step program is through Al-Anon, as I found myself just as miserable and diseased as the addicts around me due to my response to their addictions. It's hard to go into much detail on a short answer about all of the different aspects of life it has affected. I will say that I have learned to live healthy and with general well-being despite being unable to help people I truly care about. I've been working on this path for 5 years, and had my last fight about substance abuse over 3 years ago. My husband has since sobered up (just passed his 2-year, also with a 12-step program), but I would not have been able to still be here with him if I wasn't working my own program. Other family members are still suffering, some close to death, but I'm still able to live my life and accept that I simply can't change them and I can control how they affect my life.
Do 12-step programs work for everyone? No. Not even the majority. Addiction is a terrible, terrible disease that kills tens of thousands, and robs the lives of millions more even though they're still breathing. The important thing is that they do work for some -- in my experience, that's anyone who is truly able to "get it" and truly internalize and apply the concepts. It's not as easy as it sounds, and it's not a "one and done" sort of deal -- it's an ongoing process, just as all of life is.