The War Elephant was an ancient battlefield weapon popularized most notably by India. The pondering beasts were trained and domesticated to the fullest extent and commanded by a driver straddled across the great beast's neck. Atop the back of the elephant was an emplacement (known as a "bowdah") that remained opened on top. This area allowed for the addition of two archers to be placed above the battlefield and attack targets below at will, allowing for a sort of ancient mobile battlefield platform.
Depending on the region, War Elephants were usually not the major set piece of a battlefield (though sometimes fielded in the hundreds) but they could quickly change the direction any battle with their mere appearance, sounds and odor. Enemy soldiers not use to seeing or combating elephants could break discipline and rout. Cavalry horses were also known to dislike the smell, sight or sounds of oncoming elements and refuse to proceed.
As powerful as they were, War Elephants were ponderous at times (though as fast as a horse at straight speeds in some cases) and not highly maneuverable. They were also prone to break attack when punished from arrow (especially flaming arrows), sword or spear wounds, often sending the uncontrollable beast back into friendly ranks, disrupting charges. The driver of the elephant also sat up high and unprotected from enemy artillery and was subject to wounds and death, rendering - in effect - the war elephant driverless. Though confusion caused by wounds or hyperactivity common on the battlefield, the driver was provided a wooden mallet and chisel to which he could drive a stake through the spine of the elephant, killing it from causing anymore damage to one's own side.
Another known method to combat the War Elephant - though subject to some debate - was the War Pig. Elephants would apparently dislike the sounds and quick movements of the small animals enough to disrupt their war mentality and their driver's commands. Additionally, it is reported that these War Pigs would be covered in oil and set alight, then sent in the general direction of the elephant causing even more commotion.
Hannibal utilized his surviving War Elephants (those surviving the grueling journey through the Alps) effectively in later engagements against the Roman Empire. Likewise, Alexander the Great utilized his legendary battle expertise to combat successfully against War Elephants throughout Persia.
As methods in combating the War Elephant became more apparent, the creatures were assigned a contingent of soldiers to guard the vulnerable underbelly of the beast, particularly from spear attacks. As such, the group of soldiers guarding the War Elephant became the first victims of most any engagement involving the great beasts - a testament to how respected these creatures became in later wars.