nail (n.) Look up nail at Dictionary.com
Old English negel "metal pin," nægl "fingernail (handnægl), toenail," from Proto-Germanic *naglaz (source also of Old Norse nagl "fingernail," nagli "metal nail;" Old Saxon and Old High German nagel, Old Frisian neil, Middle Dutch naghel, Dutch nagel, German Nagel "fingernail, small metal spike"), from PIE root *(o)nogh "nail" (source also of Greek onyx "claw, fingernail;" Latin unguis "nail, claw;" Old Church Slavonic noga "foot," noguti "nail, claw;" Lithuanian naga "hoof," nagutis "fingernail;" Old Irish ingen, Old Welsh eguin "nail, claw").

The "fingernail" sense seems to be the original one. Nail polish attested from 1891. To bite one's nails as a sign of anxiety is attested from 1570s. Nail-biting is from 1805. Hard as nails is from 1828. To hit the nail on the head "say or do just the right thing" is first recorded 1520s. Phrase on the nail "on the spot, exactly" is from 1590s, of obscure origin; OED says it is not even certain it belongs to this sense of nail.
nail (v.) Look up nail at Dictionary.com
Old English næglian "to fasten with nails," from Proto-Germanic *ganaglijan (source also of Old Saxon neglian, Old Norse negla, Old High German negilen, German nageln, Gothic ganagljan "to nail"), from the root of nail (n.). Related: Nailed; nailing. Meaning "to catch, seize" is first recorded 1766, probably from earlier sense "to keep fixed in a certain position" (1610s). Meaning "to succeed in hitting" is from 1886. To nail down "to fix down with nails" is from 1660s.