Panic has been one of the more influential factors in many historical battles.
It happened often at the time of defeat when a line was broken or the army leader or king had died. More often it meant defeat for an otherwise still undefeated force.
Classic panic triggers were unexpected attacks; especially attacks from the rear and/or by cavalry against an unprepared infantry force. Paint and war cries were partially meant to improve the chance of inflicting a panic on the enemy.
It's still normal to expect panic if multiple rocket launchers or other very rapid & powerful indirect fire attacks hit badly trained troops that lack cohesion (such as African paramilitaries). Again, the combination of lacking preparation (training, equipment, cohesion), irresistible power and unexpectedness of the attack are the likely causes for panic.
Panic can also occur among especially among leaders if communications break down. That's less of a problem with a command system that emphasizes independent leadership of subordinate units whose leaders are used to do most without detailed guidance from superiors. It's often a knock-out to other units, including those with weak leaders.
A particularly interesting type of panic in both World Wars was the Panzerpanik (tank panic). Infantry was more often than not unable to resist tanks with a good chance of survival due to the tank's brute strength (mobility, firepower, protection). The exploitation of the tank's less obvious weaknesses such as the limited fields of vision required strong nerves.
The human instinct seems to be to run away - something that rarely worked against the super-slow tanks of WWI and almost never against the tanks of WW2.
A training countermeasure to Panzerpanik was used in many World War II armies; soldiers were sent into a well-constructed trench and had to endure that a (friendly) tank drove over them. I've never seen any reports about whether this training was worth the effort.
Other training countermeasures included often improvised means for defeat or stopping of tanks, of course.
Hardware countermeasures were much more important and a reasonable tool was found in the Panzerfaust, a short range anti-tank weapon that did at least keep tanks from rolling over infantry and thus broke their momentum. It was also numerous enough to be available to almost every soldier. The infantry got the chance to hide behind cover - and to defend himself if the tanks closed in nevertheless.
The actual capabilities of tanks and anti-tank hardware aren't the only factors of interest, though. A notable anecdote was the Panzerpanik that happened in the French 55th Infantry division that was meant to defend Sedan in May 1940. The Germans were crossing the Meuse river at Sedan with an armoured division, but they had not yet moved any tanks over the river. The most intensive air attacks ever up to that date were hammering the division, and suddenly a rumour about atacking tanks spread among the rear (artillery) units of the division without any real tanks on their side of the river. The rumour created a panic and shattered the division more than actual fighting. Even officers up to the division HQ panicked.
The origin of this panic in the rear units is remarkable because the French artillery of that time was still lavishly equipped with the Soixante-Quinze field gun. This gun was easily able to defeat all German tanks at good ranges, including by frontal hits (as was proved in the same campaign). The troops with the most powerful anti-tank weapons of the whole division were panicking due to phantom tanks!
This was not a problem of national traits, and these men were not ridiculously ill-trained underage African militia fighters. The problem was a lacking psychological preparation (and of disappointing leadership, but leaders are mere humans, too. They need to be prepared as well.)
This begs the questions whether
(a) the current psychological preparation of our (rear) troops is good enough.
(b) we may have missed triggers for panic and are probably inadequately hardened against them.
(c) the panic triggers in our own forces are fully aware of that potential as well as how & when to exploit it.
This is likely a great area for research that could yield a very high pay-off.
Related blog posts:
2009-10-18 Crisis in battle
2009-10-02: Camouflage for choppers in Afghanistan
2009-02-24: Jericho sirens
P.S.: Such research goes well beyond my personal capabilities.
(b) alone would already require at least a € 250,000 two-year research project in cooperation with psychologists, a literature research in lessons learned and other reports from combat, interviews of NCOs and officers from units that did either extremely well or very poorly (Georgia and Iraq come to my mind) and last but not least (but definitely last) a literature review of EBO (effects based operations) literature.
A strong, unmitigated panic goes well beyond both experience of most Western veterans of recent wars and beyond reasoning. You cannot research this on the cheap.