Aftercare is just continuation of treatment: the help you get once you've detoxed or stopped drinking.
Don't underestimate the importance of keeping in touch with some sort of outside help - whether that's a professional, a self-help group or an online forum.
I can't emphasise enough how important it is to stay in treatment. I'd say that the most common cause of failure that I see is due to this. Often people drop out of treatment because they're feeling fine - a sort of honeymoon period - and then something catches up with them, they relapse, but they feel too ashamed to get in touch to talk about it. What could probably have been put right just washes them downstream until they're in a despairing mess again.
Whilst there are different kinds of medication to help you stay sober, psychological help should be the main component of all aftercare. Indeed, all the guidelines on the use of these drugs clearly state that they are to enhance psychological help, not to replace it, and research shows that taking them as a standalone treatment is unlikely to work.
The purpose of psychological help is to help you to understand, cope with, resist and ultimately get rid of cravings to drink, so that you don't start drinking. (I've made that deliberately simple. An effective treatment is one that will help you to choose not to drink.)
How does this happen?
First of all, the help you receive is built around a trusting relationship with your counsellor (or therapist, or worker, or whatever they call themselves), or with the group that you attend - whether an AA meeting or any other kind of group. Psychological help can be useful to prepare you both before you stop drinking, during detox, or after you've stopped. The typical things that you'll do might include:
Psychological treatment should give you your own sensible, structured plan that you can practice and fine tune. This sort of help may come in a package of just a few sessions, or may be long term.
I've kept this section deliberately short, because writing any more can just start to over-complicate a simple premise - that you're helped to learn to choose not to drink.
How you relate to other people will have a huge effect on whether you drink or not.
If you can spend time with others, it helps to stop you being introspective and self-centred. Especially being around other people who are helpful, who aren't problem drinkers, who you can get along with. Or you might want to be around other ex-drinkers to help share your worries, difficulties or success.
If you have a partner, or family members, or friends, who are involved with your treatment, then we know that this increases your chances of success.
Spiritual things will help a lot too - this isn't limited to gods or higher powers - spiritual stuff is anything that isn't material, it's about your heart and soul!