I've never been particularly comfortable in crowds, and have been known to get panicky & flee when a crowd is all moving, herd-like in a particular direction. Turns out it wasn't such a bad idea. Large crowds, such as those at sporting events and music festivals can turn deadly when the circumstances are right. You can access the article by clicking here: http://www.newyorker.com/reporting/2011/02/07/110207fa_fact_seabrook
or read info from a noted crowd authority here: http://www.crowdsafe.com/
so I won't talk about working your way out of a dangerous crowd in this post, as you'll learn more from those sources.
But I will say this. Your first line of defense in a crowd is the same as it is any where else. Pay attention to what is going on around you. You can feel when a crowd is starting to amp up, to move, to pack together more closely. You don't need to walk around paranoid, but be aware in the general sense of peoples' body language, both the people close to you, and those farther out. If something doesn't "feel right", leave the area. Just leave. The best defense is your absence.
Quick story: Some years ago my husband Jackie & I were shopping at Academy. We'd gone to the different areas of the store where we both wanted to shop, but happened to be within sight of each other. The store's loudspeaker came on and we heard, "Academy shoppers, this is the store manager, we have an emergency and must close the store immediately. Please evacuate the store immediately." Jackie & I took one look at each other, dropped the items we were holding onto the shelves & calmly but very quickly walked toward each other & the hell out of the store. Not a word passed between us. We watched everyone around us, scanning for danger, both as we left the store, and out into the parking lot.
Later, discussing it, we agreed that maybe 10 percent of the shoppers that day reacted as we did. Most people either blew it off entirely or mosied out slowly. One stupid woman (yeah, I said it) sat just outside the store doors with her infant on her lap to see what was going on. Hmm, let's see, Academy sells guns so it could have been a shooter, maybe an environmental hazard, it could have been a freaking suicide bomber. I doubt the store suddenly stopped accepting everyone's money because it was time for their favorite soap opera.
We never did find out the reason, by the way. I don't care. I like knowing that my husband has the instincts of a survivor.
If you sense, or have any reason to believe that something is about to go down, please go away. If this is a subject that interests you, as it does me, those links are a good place to start. To read the whole New Yorker article you have to be a subscriber, but any library will have a copy.