Old English hamor "hammer," from Proto-Germanic *hamaraz (source also of Old Saxon hamur, Middle Dutch, Dutch hamer, Old High German hamar, German Hammer). The Old Norse cognate hamarr meant "stone, crag" (it's common in English place names), and suggests an original sense of the Germanic words as "tool with a stone head," which would describe the first hammers. The Germanic words thus could be from a PIE *ka-mer-, with reversal of initial sounds, from PIE *akmen "stone, sharp stone used as a tool" (source also of Old Church Slavonic kamy, Russian kameni "stone"), from root *ak- "be sharp, rise (out) to a point, pierce."
As a part of a firearm, 1580s; as a part of a piano, 1774; as a small bone of the ear, 1610s. Figurative use of "aggressive and destructive foe" is late 14c., from similar use of French martel, Latin malleus. To go at it hammer and tongs "with great violence and vigor" (1708) is an image from blacksmithing (the tongs hold the metal and the hammer beats it). Hammer and sickle as an emblem of Soviet communism attested from 1921, symbolizing industrial and agricultural labor.