Concealed handguns and crowds are not a good mix, as there are more opportunities for someone to discern you are armed. Assuming you are legally armed with no restrictions, having someone know you are armed is not in and of itself life threatening. That can change quickly, however, if a knucklehead learns and decides it would be "fun" to take your gun away from you.
Avoiding such crowds, particularly densely packed ones, is the obvious best course of action, but life doesn't always cooperate. Anyone can be caught up in a sudden mob—such as a public transit accident or any circumstance that causes a large number of people to pack together.
The grab itself is done in a manner similar to how some react to finding a $100 bill lying on the ground. A quick glance, a quicker swoop down and an even quicker exit from the area. The only difference, if you are fortunate, is the would-be gun grabber may announce his intent. This pre-attack warning is good and bad, as it does give you some time in which to react, but it also now makes you the center of attention, which limits your reactions.
The worst case, of course, is someone who sees you having a gun as his lucky day for simply being in the right place at the right time. He sees that, with relatively little effort and also little chance of being caught, he gets a gun for use or sale.
There is no one answer to how to protect your handgun in crowds other than not having one or having a gun small enough it's not able to be seen as a gun or felt as a gun. At the very least, keep your gun arm at your side and, if you are carrying the gun at waist level, hold your arm over the gun, keeping constant contact with it while it is pressed against your body.
This does work, but if you're in a crowd sometimes one or both hands are occupied carrying things—holding the hand of a child or two and/or your spouse, or using your arms and hands to maintain your space just to move in the crowd. You want to avoid this if at all possible.
One thing you definitely should not do is link your arm with someone else. Arm in arm is romantic and, depending on the focus of the group (for example, a spontaneous demonstration), arm linking does emphasize solidarity, conviction or intent.
I had one such attempt back in the day when I was dumb enough (once) to lock arms with folks on either side of me—and with my suit coat unbuttoned as well. A short lurch of the linked line of people pulled me in such a way that my coat was wide open, fully exposing my heretofore-concealed S&W 4-inch Model 19 revolver.
I carried it strong-side, outside my waistband in a holster that had two vertical restraining straps snapped above the hammer (state-of-the-art retention back then). In about a nanosecond after my flashing the crowd, the man closest to me grabbed for my gun. Since both of my arms were interlocked, I kicked him. He fell. Our line moved as I broke free. I didn't stop to ask him why he did it.
As noted earlier, you should keep your gun-side arm free to protect your gun (when you're wearing it at waist level) by both covering and pressing inward on the gun. The downside is you are now moving awkwardly and perhaps drawing attention to yourself. Be aware of this at all times.
A security holster is a good choice, but only if you practice with the safety features until your draw is reflexive. However, don't depend on those features completely, because there's simply no one "best" security holster, for a few reasons.
Hand size, arm length, mobility of your limbs and manual dexterity vary. The actions needed to release the single or multiple retention devices are more "natural" for some than are others.
The overall holster design and material—be it leather, polymer or a combination of the two—may not be to your liking or particular needs. Some handguns are not good fits for some retention systems.
Modes of dress can cause changes in concealment needs. Entire books have been written on holster selection and their applications. This surplus of choice is in part why many of us have a box or two of different holsters sitting around.
No holster system provides absolute security, and no holster makes such a claim, for if you can draw the gun, so can someone else. A security holster simply buys time for you to respond as required.
The primary gun retention defense is keeping it concealed. In crowds, you also need to step up your game. Some easy-to-do steps include buttoning or zipping up your outer garment. Pulling your shirt out and over your gun also helps if your first concealment efforts have been disrupted for whatever reason. I've done this two ways: Just pull my shirt out enough to cover an IWB-carried gun or pull the entire shirt.
The two choices are, of course, based on the size of the gun and if the holster is inside or outside the waistband. I go with whatever appears to look more natural. Should I look slightly sloppy with only part of my shirt pulled out or all of it out? The cut of the shirt often dictates this. This works well with an inside-the-pants holster and is a quick, standalone concealing action if you have to—or want to—remove your coat.
Gun handling in such circumstances isn't recommended because in so doing you're exposing your handgun—exactly what you're trying to avoid. Also, since such handling is likely a stopgap, last-minute action, gun muzzle and finger discipline can suffer. It's something else to practice rigorously.
There's no one good answer to how to protect your gun in a crowd, other than not being there. The foregoing are some suggestions that have worked for me and others whom I respect. I think anyone legally armed has a moral if not legal responsibility to make every effort to prevent a gun grab.
However, I am specifically not suggesting any formal method or technique for defeating a gun grab. What I do suggest is getting formal training from a certified instructor whose curriculum covers the concealment needs of non-sworn citizens. That is, without a doubt, the best answer as to how to protect your handgun in a crowd.