Helms Deep referred to the entire fortified system which included the gorge, the Deeping Wall built across the gorge, the fortress of Hornburg, the cavern refugeknown as Aglarond (or the Glittering Caves) and the Deeping Stream that flowed from the gorge.
The defences of Helms Deep were largely built by the Men of Gondor, although the caverns of Aglarond were believed to have been delved during the Second Age by the Númenórean Sea Kings.
In 2758 , the Rohirrim led by Helm Hammerhand defended the fortress against the Dunlendings. During the War of the Ring, King Théoden kept the forces of Saruman away from the people of Rohan in the Battle of the Hornburg, where it was terribly damaged.
During the Fourth Age Eomer, together with Aragorn and the Dwarves of Aglarond, rebuilt it and fortified it.