In my gym, they have this thing called a "20-minute war." The idea is to fight against 3+ attackers for 20 minutes. However, when I am dealing with 1 attacker, the other two attack me, and so on. I asked my teacher how to deal with this, and he said I need to learn how to take punches from my other 2+ opponents when I am dealing with one. How do I take punches from 3+ people?
You have to use the concepts you learned in your Krav Maga classes (Disclaimer: this is what I learned in classes and seminars, anyway):
Always try to have the person you deal with between you and at least one of the offenders (both all the time is virtually impossible). Also, try to have your 'active' side (punching/kneeing) turned towards the second offender. This makes it harder for them to hit a sweet spot. As soon as you shocked and grabbed, you can easily turn yourself and your target accordingly. In the ~2-5 seconds until you should have finished your reaction pattern, they will have a hard time to reposition and attack in a coordinated way.
Speed and efficiency
If you deal with one person, move in fast and hit fast and hard. As I said, your series of a particular reaction pattern (kick, punch, knife, baton, gun) should take no longer than 2-5 seconds. The less time you are bound there, the less the other two have opportunities to hurt you
A huge part of Krav training is physical and psychological conditioning. Sure, you will take blows. And sure, they will hurt, but the point of the exercise is not to be able to prevent all damage, but to be able to suck it up and survive. Physical conditioning should be a regular part of your training. Psychological conditioning is the main point of these "wars" and other settings.
Long story short
In Krav settings like these, like in real fights, there is no "winning the game". The main proficiency you train, aside from assessing and mitigating the main threat and applying your reaction patterns under high psychological and physical stress, is the mindset of never giving up and continuing till the situation has ended. "Fighting like a dragon", as an instructor vividly put it. Thus, taking the blows is not mainly a technical ability here. It is about physical, psychological, and tactical abilities. Before anything else, it is mainly about your will to carry through and continue to concentrate on the main threat. That is what will help you most in real self-defense as well...it can be very disturbing and deterring for offenders.