You see it all the time in movies, the main characters taking down tons of enemies during a battle. It always bothers me, because I feel like with just the sheer number of soldiers and how in reality it’d just be a giant mob of people shoved against each other, you’d be very likely to just get stabbed by someone from the side or have no room to really “fight” someone properly in hand-to-hand combat
More can always be added to a topic and I really hope more will be. It's a great question but it also reminded me of a somewhat similar question that had been asked here before. As I tried to find it I stumbled upon a couple of others:
3. What was sword fighting actually like? Did it occur during war?
4. What did swordsmanship look like in the middle ages?
by the way, mods/frequent subreddit users; is it OK to give links like this to earlier threads?
The great warrior wading into the midst of the enemy, slaying to his left and his right, is an old trope. For example, the Egyptian description of the Battle of Khadesh presents the Pharaoh as such a warrior:
Then the King arose like his father Monthu. He seized his weapons and put on his armor. The King had quickened his course; he rushed into the middle of the hostile hosts of Hatti. All alone, no other was with him. When Pharaoh had done this, he looked behind him. He was surrounded by two thousand five hundred pairs of horses. His retreat was beset by the bravest heroes of the miserable King of the people of Hatti.
"Not one of my princes, not one of my captains of the chariot, not one of my chief men, not one of my knights was there. My warriors and my chariots had abandoned me. Not one of them was there to take part in the battle. I had met two thousand five hundred pairs of horses. I was in the midst of the charioteers, but they were dashed in pieces before my horses. Not one of them raised his hand to fight. Their courage was sunken in their breasts, their limbs gave way, they could not hurl the dart, nor had they the courage to thrust with the spear. I made them fall into the waters just as the crocodiles fall in. They tumbled down on their faces one after another. I killed them at my pleasure, so that not one looked back behind him, nor did another turn around. I killed them; no one escaped me."
There is, of course, an element of exaggeration in this description. It does show that this heroic warrior image has been with us for over 3000 years.
Did skill matter on the Ancient/Medieval battlefield? Yes, but not as much as in one-on-one duels. The basic skills - being able to hit effectively with one's weapons (including being able to shoot bows, load and shoot crossbows, load and shoot guns where appropriate), move in armour, use one's shield - were essential, but relatively easy to teach and learn. More important was discipline and courage - holding formation in the face of the enemy, advancing to attack when commanded to, etc. Battles have rarely, if ever, been lost due to one side not knowing how to use their weapons, and many battles have been lost due to one side's lack of discipline and determination. To give just one example, at the Battle of Poitiers (1356), the French army was organised into 3 divisions ("battles"), each to attack in turn. The first two would weaken and the English, and the third battle would defeat them. The first battle engaged, fought, and withdrew. The second battle didn't fight, but instead withdrew along with the first. The third battle was unable to do their own job as well as that of the second battle, and failed to win.
in reality it’d just be a giant mob of people shoved against each other
It is very unlikely that battles were disordered mobs just pushing each other. First, it's very bad for the losing side - Lanchester's Law reigns supreme, and the weaker side will be rapidly destroyed in such fighting. Second, it's bad for the winning side - it's much better for them to keep the opposing formation busy at arm's length and then hit them in the flank or rear, or use ranged weapons, to destroy their resolve and morale until their formation disintegrates. Just charging into an enemy formation is asking for heavy casualties with no guarantee of success (e.g., if they fail to break the enemy front line, they're sitting there exposed to point-blank range missiles).
Formations are important. Maintaining formation matters a lot. Battle could be chaotic, and especially when cavalry units meet on the battlefield, the units can be intermixed. Reforming formations after such things matters a lot. Battle is not a swarm of individuals doing their own thing, but formations working to a plan. For a recent discussion of this by u/Hergrim see https://www.reddit.com/r/AskHistorians/comments/e320vm/netflixs_the_king_has_a_particularly_brutal_final/
We also don't see this kind of thing in art. Art shows fighting in formations. Even when things are close and nasty, there is order, there are formations. E.g.,
We don't have video available of real Ancient/Medieval battles, but modern riots - the more organised kind - provides clues:
Note that formations are maintained. Formations are re-formed if lost. The fighters work together. Note the heavy use of long weapons (in these case, long poles rather than spears or bladed polearms, since these are riots/protests, not Medieval battles). Also note the use of missile weapons. Many battles had far more, and far deadlier, missiles flying through the air. Often, arrows, crossbow bolts, and bullets would be the main cause of wounds and death.
Skill matters, but numbers and formation matter too. Skill is of limited use against the incoming arrows and, especially, bullets. Tsukahara Bokuden, a samurai of the Sengoku Jidai, reputedly of immense skill, boasted of having fought in 37 battles and only being wounded 6 times - all 6 times due to arrows.
The great heroic warrior who wades in alone among the enemy will get hit from behind. The great heroic warrior who stays in formation will be able to fight effectively, and his skill will help. He will be able to hit the enemy more effectively, more reliably, and in turn be less likely to be hit. But he isn't safe - there are many opponents, and incoming javelins, arrows, etc.
Given a basic level of skill, discipline and steadfastness matter, and wise leadership to make use of that.