Cowardice is a trait wherein excessive fear prevents an individual from taking a risk or facing danger. It is the opposite of courage. As a label, "cowardice" indicates a failure of character in the face of a challenge. One who succumbs to cowardice is known as a coward. 
As the opposite of bravery, which many historical and current human societies reward, cowardice is seen as a character flaw that is detrimental to society and thus the failure to face one's fear is often stigmatized or punished.
According to the Online Etymology Dictionary, the word coward came into English from the Old French word coart (modern French couard), which is a combination of the word for "tail" (Modern French queue, Latin cauda) and an agent noun suffix. It would therefore have meant "one with a tail", which may conjure an image of an animal displaying its tail in flight of fear ("turning tail"), or a dog's habit of putting its tail between its legs when it is afraid. Like many other English words of French origin, this word was introduced in the English language by the French-speaking Normans, after the Norman conquest of England in 1066.
The English surname Coward (as in Noël Coward), however, has the same origin and meaning as the word "cowherd".
In German, the word translates into "Feigling" and "Weichei", the latter of which translates back to "soft egg" in literal.
Acts of cowardice have long been punishable by military law, which defines a wide range of cowardly offenses, including desertion in face of the enemy and surrendering to the enemy against orders. The punishment for such acts is typically severe, ranging from corporal punishment to the death sentence.
The United States military codes of justice define cowardice in combat as a crime punishable by death.
Generally, cowardice was punishable by execution during World War I, and those who were caught were often court-martialed and, in many cases, executed by firing squad. British soldiers executed for cowardice were often not commemorated on war memorials, and their families often did not receive benefits and had to endure social stigma. However, many decades later, those soldiers all received posthumous pardons in the UK Armed Forces Act 2006 and have been commemorated with the Shot at Dawn Memorial. Unlike British, Canadian, French, German, and Russian forces, the U.S. military tried soldiers for cowardice, but never followed through with execution while German commanders were less inclined to use execution as a form of punishment.
Considerable controversy was generated by military historian S.L.A. Marshall, who claimed[when?] that 75 % of U.S. combat troops in World War II never fired at the enemy for the purpose of killing, even while under direct threat. Author Dave Grossman attempted to explain these findings in his book On Killing: The Psychological Cost of Learning to Kill in War and Society. Marshall's findings were later[when?] challenged as mistaken or even fabricated, and were not replicated in a more rigorous study of Canadian troops in World War II.
[the] lack of courage to face danger, difficulty, opposition, pain, etc.
As a military historian, I am instinctively skeptical of any work or theory that claims to overturn all existing scholarship – indeed, overturn an entire academic discipline – in one fell swoop...[however] Lieutenant Colonel Grossman's appeals to biology and psychology are flawed, and that the bulwark of his historical evidence – S.L.A. Marshall's assertion that soldiers do not fire their weapons – can be verifiably disproven.