“Holy mackerel,” I said, “where are you planning on going?” A student had just asked me what to do if you were surrounded by a number of attackers. Now students who train with me know that my usual answer to a self-defense question is “it depends.” That is not a cop out or a blow off, it is a reference to the fact that there are always many variables to consider in any situation. For example, what environment are you in, what kind of surface are you standing on, what is your current physical condition (tired from trying to run away, just getting over the flu, best shape of your life, etc.) what are the physical specifics of the attacker, and so on. I have to say I do believe this is an unlikely scenario for most of us, yet always possible.
All that said, here are a few thoughts. First try to spot an escape route. Then try to assess who the leader is, usually the one with the big mouth. Launch a preemptive attack on the leader to break through the circle to position yourself on the outside. Make sure the attack delivers immediate structural damage.
If you are capable and it is an option, run. This is not likely to turn out like some exhilarating movie scene with a couple of trophy bruises and a casual departing one-liner.
If escape is not an option, look for things in your environment that you can use as weapons. Crude projectiles can be very valuable, just make sure you understand the principles of shuriken use. In fact, you need to be very well versed in application of the four primary categories of basic weapons – short bladed, short rigid, flexible and projectile.
Then do your best to keep yourself positioned so that the remaining attackers are not able to surround you again. Try to use doorways and obstacles to force the attackers to line up as much as possible so you can deal with them one at a time.
Beyond that, hope that whoever you pray to is watching out for you that day. If there are weapons involved, which is likely, these principles still hold true. Obviously if guns are involved one of the first things is to seek cover.
This is perhaps a fun question to theorize about, but the reality would be most serious indeed, even for the most highly accomplished practitioner. Best to avoid such situations and stick to watching actors and stunt people make them entertaining. In any case, your current best plan of action is to keep training and take your training seriously while maintaining a good level of safety and having fun. Oh, and, it wouldn’t hurt to make it your habit to hang around highly trained people