I've done an awful lot of martial arts classes (and taught quite a few) over the years, always keeping an eye towards self-defense . . . ranging from Aikido, Taekwondo (WTF), Hapkido, boxing, wrestling, Muay Thai, Judo, to Brazilian Jiu-Jitsu. You've asked a very big question, that will naturally lead to a variety of right answers.
If you're looking for purely self-defense my advice would be to focus on something where you spar hard, regularly. In a fight you will react based on how you've reacted in similar situations. If you've never been hit hard in the face by someone while sparring, you will not respond well to being hit hard in the face by someone in a fight. If you've never been slammed to the ground, had the wind knocked out of you, and had to escape from a bigger person on top of you while gasping for air . . . you will not respond well to that situation in a real fight. Learning to keep your head and remember your training while in pain, and while someone is trying to hurt you is not possible without regular exposure to that sort of situation. BJJ, Muay Thai, Boxing, and to some extent Judo and Wrestling are good for learning this.
Expect to spend years learning to defend yourself. Self defense can take a variety of forms. You might have a big guy push you to the ground and get on top of you. You might have someone punch you in the face. The guy might have a knife, or a baseball bat. You might have a group of people attack you. You might have a guy grab you from behind with an arm around your neck. There are different strategies and habits that you need to learn to defend yourself, and things that work great in one scenario aren't going to work in another.
While you do need to have an idea of what to know in a variety of situations . . . in a fight, options can be overwhelming. You want one clear path to take so you don't end up hesitating and getting badly hurt. So in class, focus on learning one thing really, really well at a time until you've mastered it. If you're taking judo, learn a single throw until you can land it from any position, you know multiple entries into it, and you know a variety of unbalancing/setup techniques for that throw. If you're learning BJJ, master an escape, a sweep, and an attack. There will always be a million variations and a billion techniques to use . . . you want to find a high percentage one that works for you and then drill the crap out of it. It can't be something that you remember, it needs to be trilled and sparred enough until your muscles know it when your brain turns off.
As general rules for finding a good place to learn self defense:
- Stay away from any martial art where you don't regularly spar with hard contact against a variety of different people.
- Stay away from any martial art that claims to have a reliable 'touch of death' move . . . these can never be practiced while sparring, and if you can't practice it, my experience is that you can't do it when you need to.
- Stay away from any martial art where a large percentage of your time is spent solo dancing (forms, patterns, kata, whatever you want to call it). This is useless for self defense.
- Stay away from any place that claims it will be able to teach you to defend yourself in a few months. (Can't happen.)
Good martial arts places won't be cheap, but they don't have to be cripplingly expensive either. Most Judo places are reasonably priced, and boxing gyms can be pretty cheap too. Most good gyms will let you sit in for a couple classes before forking any money too., so take them up on the offer and make sure that you're feeling the environment and instructors before paying.
My last suggestion (if you're a woman) would be that you start by learning Brazilian Jiu-Jitsu. Any decent BJJ club will have you sparring soon, and will teach you how to escape from a larger person trying to knock you to the ground and get on top of you. Given rape statistics, this is probably the most common self defense situation you're going to run into.