Enrolling in some martial arts classes of certain styles can give a false impression of being actually a useful form of self-defense. Many such styles claim and give the appearance of being very practical down-to-earth styles, concentrating on what "actually works" rather than just flashy choreography and scripted moves.
Yet, time and again, even people who have actively studied such disciplines for years and have achieved very high ranks, may get easily beaten up if they get into an actual street fight. Suddenly nothing of what they have learned seems to matter, none of the moves they have practiced countless hours seem to work, they never seem to get the opportunity to perform these highly-practiced moves (no matter how "practical" and "down-to-earth" they seemed to be), and the whole mess becomes just a mindless and ugly brawl that doesn't resemble in the slightest the training sessions, where the physically stronger and/or bigger/heavier guy probably ends up beating the other (even though these martial arts styles almost invariably claim that size doesn't matter and that with the proper technique even small people can effectively defend themselves against a much larger opponent.)
(And, indeed, most of these martial arts styles often teach their students how this and this move, and doing it like this and this, works no matter how strong the other person might be. And when demonstrated against a complying training partner, they do indeed seem to work. And yet, in an actual fight there never seems to be an opportunity to put it into practice. And even when once in a blue moon it happens, it's only a very temporary thing that achieves almost nothing.)
Some of these martial arts styles might have some chance of working against very unskilled assailants if it takes them by surprise, and especially if they are somehow impaired (ie. most typically drunk). If a drunkard attacks you, you might have some chance of fending him off using these techniques.
However, quite often if the assailant is not impaired, and especially if he is stronger and has even a modicum of street brawling experience and determination, and is determined to beat you up, you often have no chance, no matter how much of a black belt you might have in some fancy martial arts style. (And if there is more than one assailant, just forget about it, even if they are inexperienced. Basically your only option is to try to run away as fast as you can, if you can, and hope that they aren't determined on catching you, or that you are in much better running shape than them.)
But why don't these martial arts styles work in practice? Why is it that these styles look so effective and so beautiful in demonstrations and classes, but when these highly-experienced highly-ranked martial artists get into an actual real fight against a assailant determined to beat them up, none of the techniques seem to work and it just ends up being an ugly brawl (where the martial artists probably gets beaten up, especially if the assailant is stronger and bigger)?
And I'm not even talking here about styles that are so obviously ineffective that they look outright ridiculous in demonstrations (such as Aikido). I'm talking about those styles that claim to be (and look like) very practical and down-to-earth, concentrating on things that "actually work".
One of the biggest problems with most of these styles is that they practice all kinds of stances, moves and counter-moves, again and again, hundreds of times, against a willing cooperative non-resisting opponent. What seems very "practical", something that "actually works", is so only because the practicing partner is taking it slow, and not resisting much. Even in styles where the practicing partner is supposed to give some resistance, he doesn't really. After a modicum of "resistance", he just goes along, and doesn't try his hardest to "ruin" the move. He doesn't react like a real assailant would in an actual fight.
Most of these styles do not engage in full-contact competitive fights at all, against people who are determined to win no matter what. Some styles may engage in "light-contact" and "medium-contact" competitions, but they always have myriads of rules, with myriads of things prohibited. The opponent will be resisting, but only within very strict rules. Actual assailants in real life do not follow any such rules, and will do anything they want.
Very, very few styles will have full-contact competitive fights, but even they will often be heavily regulated by a judge. (For example, one of the most typical actions is to stop the fight when one of the fighters have fallen to the ground. Which, of course, is completely unrealistic when it comes to actual fights against an assailant.)
Perhaps the only "style", if you can call it that, that actually results in people who can defend themselves pretty well in an actual fight, is Mixed Martial Arts (which isn't actually any particular "martial arts style", as it is whatever they fighter wants it to be.) You can find tons of videos out there of masters of fancy martial arts styles fighting against MMA fighters, and getting beaten up quite badly. All their flashy moves, and their decades of practice, seem to matter little when an MMA fighter hits them like a ton of bricks, and grapples them to the ground and starts pounding on their face with his fists.
The most popular actual martial arts style that actually seems to work in MMA, is Brazilian jiu-jitsu. Most MMA fighters have practiced this to varying extents, and have experience on it in their repertoire. It's very often precisely jiu-jitsu grappling that throws off even grandmasters of other martial arts styles. They seem to be almost completely defenseless against it.
These grappling techniques are not very pretty nor flashy, but they seem to be highly effective. Your opponent just grapples you, trips you over or throws you on the ground, keeps you there and starts pounding your face like a piece of meat being tendered. They have tons of techniques to keep you on the ground, not allowing you to escape and get up, and they just keep pounding relentlessly. Alternatively, if they get to your backside, they take you on a chocking hold from behind, which is essentially impossible to escape from, and will choke you unconscious unless they let you go. No amount of resisting and struggling is helpful. And experienced MMA fighters are so physically strong that it's almost hopeless to even try.
The thing about MMA is that, just like western boxing, they practice a lot against resisting opponents. But unlike boxing, the limitations are much less, and thus the fighters aren't bound so much. (Incidentally, western boxing can be quite an effective form of self-defense, precisely because of all the full-contact competition against resisting opponents. However, due to its rules and limitations it's not as effective as the less limiting MMA styles.)
One criticism levied against Brazilian jiu-jitsu is that it doesn't work well against multiple assailants. That may well be true. However, the same is true for all self-defense styles, no matter what it is. As commented earlier, if you are attacked by multiple assailants, essentially your only choice is to try to fun away as fast as you can, no matter what. There is no martial arts style in existence that will work against multiple assailants determined to beat you up (except, perhaps in extraordinarily rare individual circumstances). That's just a fact of physical reality.