Human wave attack is a relatively modern term for a very old concept in
infantry warfare. It describes the '
tactic' of assaulting an enemy with multiple lines abreast of soldiers, typically moving at the best speed they are able. This results in an action very like that of waves striking a shoreline - lines of soldiers engaging the enemy position or formations in succession.
History
The human wave attack dates back beyond most recorded history. Sun Tzu had harsh words for this tactic in his famous The Art of War, noting that it was possible for a poor general to lose a third part of his troops without gaining his objective. However, there were reasons (besides frustration on the part of a commander) why they would be utilized.
Warfare involves the effort to bring an enemy within the range of your forces' ability to do violence to them. In ancient times, when machinery had not entered warfare in a pervasive way, the amount of force any soldier could bring to bear on another soldier was limited to his own body strength and the range limited to the reach of his arm, lengthened only by clubs, spears or swords. In conditions such as these, the only means of multiplying your force against an enemy available to a commander in a battle once it is joined is to bring more soldiers to bear on fewer targets. It is not possible to aggregate the effects of soldiers who are not within arm's reach of each other and their enemy. As a result, if the battle can be directed in such a way as to maneuver a larger number of attackers within running range of a smaller number of defenders, it makes sense to have the attackers engage in as large numbers as possible as quickly a possible. The simplest way to avoid the chaos of an uncoordinated charge is to form lines and have the lines advance by signal - a simple and minimal formation.
When facing defenders holding prepared positions, prior to the advent of siege engines the only real way to defeat the defense in combat was to throw enough soldiers against the defenders to overcome the advantage of the fortifications or terrain they were utilizing. Again, the swiftest and simplest way to do this was to utilize waves.
Eventually, however, man-portable missile weapons entered the fray in the form of slings, bows, even atlatls. I say 'man portable' because siege engine artillery was typically too clumsy to engage small units of soldiers, and too slowly reloaded to make much difference during a pitched small-unit engagement. The introduction of missile weapons made a large difference, especially once bows appeared. They allowed the firers to mass the power of a number of men (those within range) onto a small area - in effect, they allowed the defense to multiply force without having to redeploy against the attackers. They were more effective against attackers as early missile weapons were easily shielded against by defenders, using fixed cover or shields. In fluid engagements, most missile combat occurred before the armies came to grips, when targets were easily discerned. Hence, the weaker force would have a motive to close distance quickly - and again, lines abreast were the simplest way to do so.
Once gunpowder weapons appeared, the situation changed somewhat but for the most part, early gunpowder weapons acted much as the English (thanks The Debutante!) longbow - albeit requiring less skill on the part of the wielder. One of the reasons Napoleon Bonaparte was able to so effectively wage war was that he was able to mobilize huge numbers of the French citizenry into his armies. However, these citizen soldiers were not typically as well experienced or as widely trained as their opponents. As a result, Napoleon was forced to innovate tactics to allow for their effective use.
At the time, the primary danger to ground troops was disciplined musket fire, typically on the British Army model. Musketeers would present their weapons and fire in ranks, with multiple ranks stepping forward or back to fire or load respectively. A well-trained group of musketeers could put forth three to six volleys per minute. This was a withering fire. For a 'typical' army formation, exposure to such a rate of musket fire would disable enough men quickly enough that the unit would quickly lose cohesion and cease to function as a fighting formation or organization. Napoleon realized that fighting the British at their own game was futile, as his soldiers were not trained nearly as well at the complex ballet of massed fire.
However, he realized that in order to defeat a British infantry formation (usually a square, able to direct fire against any of its sides while protecting the firing side's rear and flanks) he needed to break its cohesion. Although he wasn't able to do so by weight of fire, he was able to do so by weight of numbers. French army formations tended towards long, solidly-packed columns of men trained to march in rigid formation to the drumbeat and to charge straight ahead as a disciplined unit, in many successive waves of smaller (shorter) lines.
These formations traded the size and power of each rank for the frequency with which these ranks could be thrown against the enemy. No matter how many British musketeers faced the front of this formation, each volley could only hit soldiers in the first few ranks - and behind those ranks were many, many more ranks still charging ahead. It became a race between the 'wave time' of the French formations and the 'volley time' of the British musketeers. Thus, Napoleon's successful formations can be seen as deliberate, targeted human wave attacks, meant to defeat a specific threat. The driving factor here was that although gunnery was very lethal for the time, it was a complex activity requiring long and precise training for a unit to become proficient - and even so, there was a fixed limit on how often the musket (and, hence, the unit) could fire. Only so many ranks of musketeers could coordinate their fire in any direction without interfering with each other (usually, two or three at most).
As the French saw great success with the massed charge, European military theory began to idolize the notion of the coordinated, rigidly disciplined and swift offense. The French, especially, became enamored of the notion that a 'motivated' offense was superior to the defense, because a motivated offense could produce more soldiers than the defense could take down. This is one of the reasons for Napoleon's famous dictum that 'the moral to the physical is as three to one.' The quality of his individual soldiers wasn't that important. The quality of their equipment, likewise, wasn't that important. What was important was their willingngess and ability to charge into fire in a disciplined manner - when that was possible, they could overcome the qualititative advantages of their opponents.
Just as the musket had done with respect to the longbow, however, technology advanced the game around the turn of the twentieth century. Although the musket allowed a relatively untrained soldier to produce a single shot of devastating power which it had once taken a trained archer to fire, it took trained units to produce continuous rapid fire due to the limitations of the individual musket. With the invention of the needle gun and subsequent steps towards modern bolt action rifles, however, the wheel turned further. Now a mass of relatively untrained men could keep up a withering and very rapid fire (surpassing the best musketeer's rate of four to six shots per minute by a factor of at least three or five) so long as they could be kept in cartridge ammunition. Even worse for the offense, Richard Jordan Gatling and then Hiram Maxim introduced the machine gun. Although initially emplaced weapons, these could put out a stream of fire so devastating that there was no conceivable way enough soldiers could approach them quickly enough to overwhelm defenders so armed. For reasons which many theorists and historians argue about to this day, many militaries of the time looked at the machine gun and inferred that the ability to fire many shots would provide a relative advantage to the offense as it would serve to 'shock' the defender - much as it had been doing for the past seventy-five years or so.
The problem, of course, is that machine guns amplified the effectiveness of cover, stability and ready supply - all of which favored the defender. As the Russo-Japanese War and then World War I demonstrated with awful clarity (in hindsight, at least), it was no longer possible for Napoleon-style columns to overwhelm opponents with soldiers. Combat swiftly moved into trench warfare as both sides began throwing their industrial might into the conflict - each side could project immense force out to the range of artillery and machine gun batteries along a broad front, but attacking soldiers couldn't survive long enough to reach the enemy in the face of that power. Mauler points out quite correctly that although the Russo-Japanese war showed the cost of such tactics of the offense, the wrong lesson was learned by many general staffs as the Japanese managed to carry critical positions using them albeit with ruinous casualties.
All manner of complex tactics were tried to break the stalemate. The German army came up with the notion of the storm trooper and infiltration - the use of stealth and sudden surprise to break down a small section of the enemy's line. The British tried technology and came up with the tank. The Americans, as Americans always did, chose to expend supply over soldiers and invented the synchronized artillery barrage. The problem wasn't that these techniques didn't work - they did, locally. The problem was that again, even when they worked, it was easier to move up reserve troops and simply reform the lines than to break through and exploit the breach. Once broaching enemy lines, the advancing infiltrators or followup infantry attack to the artillery barrage or even the fragile and short-ranged tanks found themselves unable to move quickly enough in large enough numbers to actually reach the enemy supply and command lines.
In this era, with no better ideas, commanders on all sides tried the human wave attack. Since there were inevitably areas of the lines less fortified than others, it was tempting to try to overwhelm the defenders at those points. The problem there was that it was usually easier to move defenders quickly than to move attacking units secretly, and once the attack started the defenders had time to shift troops as the attackers struggled across the no man's land.
World War I ended with human wave attacks in bitter disrepute as a complete waste of human life. Passchendaele, Verdun, The Somme - all examples of human wave attacks resulting in casualties unimaginable today without atomic arms.
With World War II and the introduction of man-portable automatic weapons, as well as even more refined means of concentrating combat power made possible by pervasive artillery (tanks, rocket launchers, aircraft, etc.) the human wave tactic was even less savory. Soldiers became more valuable, as the training required to operate the more complex weapons of war grew longer and more expensive. The average engagement range, other than in cities, pushed out to the point where it was unthinkable to even imagine a wave attack being able to reach its objective or even assemble within sight of it. At the time, however, these highly lethal weapons were expensive and required massive wealth, meaning that they were typically reserved for 'great power war.' In smaller nations, or less advanced areas, black powder and bolt action shoulder arms still ruled the battlefield.
In addition, poorer nations or combatants, unable to equip their soldiers with equivalent killing power, once more would turn to the human wave attack. In one sense it was pure desperation - if the only resource available was people, then people were what got expended. On the other, there was a conscious attempt to exploit the increasing horror and disgust that grew out of the end of World War I on the part of the 'modern world.' The notion of combating moral strength reared up again, this time asymetrically - could the poorer side continue to pour forces into the meat grinder longer than the 'more advanced' power's soldiers and citizenry were willing to act as slaughterers?
Vietnam showed that while this might be a viable strategy, it was still almost useless at the tactical level. Human wave attacks were now up against strategic bombing as close air support, much less the machine gun. Over the course of nearly seven months, the American garrison at Khe Sanh, protected by all the mechanisms of modern war from barbed wire up to and including B-52 carpet bombing, stood off wave after wave of North Vietnamese regulars. Although the Americans retained control of the outpost, it was dismantled some months after the battle - and the slaughter there can be seen as contributing to the discomfort back home. Asymmetric human wave tactics, while a failure on the battlefield, may have seen success at the strategic level.
The human wave attack, however, suffered a further loss in effectiveness around this time. As Vietnam showed, it was possible for a poor and relatively unsophisticated force to nevertheless cheaply and easily acquire enough automatic weapons to ensure that even untrained forces could hold off human wave attacks. The Iran-Iraq War saw both Iran and Iraq unleash human wave attacks against their opponents both due to the same frustration with stalemate that World War I had engendered, and due to (as Noung reminds me) the loss of a professional Iranian officer corps in purges. However, against an adversary with no compunction against gunning down however many targets were sent against it, the tactic failed - and it failed as a strategy, as well. Iraq suffered a noticeable drop in able-bodied men following that war, as a result of the young men conscripted and sent out to fight in this manner.
The Future
To a great degree, the success or failure of human wave attacks - and, indeed, the willingness to adopt the human wave tactic at all - depend on the resources available to a combatant as well as their societal structure. A society too focused on individuality, no matter how primitive, will mitigate against this tactic due to the refusal of the population to participate in it. A society too concerned with human suffering as a whole, not just on its own part, will tend to both be unlikely to adopt such a technique as well as be most susceptible to the use of it.
In many cases, especially those involving the U.S. in recent years, the challenge has been not so much to destroy the soldiers in a wave as to destroy their coordination and their firepower. The U.S. and a few other large countries possess the wealth and technology to attempt to engage determined large-scale opponents in a manner other than straight annihilation, in an attempt to avoid their own societal constraints in engaging. It's an interesting dynamic, and one that guerrilla warfare, asymmetric warfare and the like is specifically designed to combat.
One of the strongest factors in recent combat is that the wealthy sides typically are not fighting to defend territory, but to defend more abstract goals. They are not fighting to directly defend their homes. As a result, they are less willing to engage in all out combat against low-equipped people, and more willing to give strategic depth and mass lethality away in exchange for freedom of operations vis-a-vis their own populace and the opinions of the world at large. It would be dangerous, however, to assume that if faced with a dire enough threat, a 'modern' force will be unwilling to engage in the slaughter than makes these tactics less than useful. It's a balancing act on the part of their opponents - to demonstrate greater determination, in the willingness and ability to sacrifice soldiers for gains, while not presenting an existential threat to the vastly more powerful force.
Addendum
I have focused primarily on the purely military use of this tactic. Liveforever reminds me that there are situations where it is still quite effective; his example is that of lightly armed/armored demonstrators versus a small number of law enforcement personnel. This situation is analogous to that of asymmetric warfare between a smaller and lower tech force against a more powerful force constrained by rules of engagement. The purpose of the demonstrators is to carry the field due to the inability of the police to bring to bear either enough forces or powerful enough weaponry to negate the advantage in numbers held by the demonstrators.