An invention for the movies, this sword was designed to be carried by Arwen, and is seen in the scene where she confronts the Ringwraiths at the Ford of Bruinen. The designers envisioned it as a sword originally forged for Idril, daughter of Turgon of Gondolin, and mother of Earendil, Elrond's father. Hence it became an heirloom of her house, and was used by Elrond during the Last Alliance, after which it was kept in Rivendell among its other treasures.
The name 'Hadhafang' means 'throng-cleaver', and is a name devised by Tolkien for a sword but never assigned. The inscription reads: "aen estar Hadhafang i chathol hen, thand arod dan i thang an i arwen" - "this blade is Hadhafang, a noble defense against the enemy throng for a noble lady". It was originally intended to have a further inscription: "Idril i hel en aran Gond Dolin" - "Idril, daughter of the King of the Hidden Rock (Gondolin)", but this was dropped due to lack of space.
Information on Hadhafang derived from Gwaith-i-Phethdain website on Language in the LotR movies.