dig (v.) Look up dig at Dictionary.com
early 14c. (diggen), of uncertain origin, perhaps related to dike and ditch, either via Old French diguer (ultimately from a Germanic source), or directly from an unrecorded Old English word. Native words were deolfan (see delve), grafan (see grave (v.)).

Slang sense of "understand" first recorded 1934 in African-American vernacular, probably based on the notion of "excavate." A slightly varied sense of "appreciate" emerged 1939. Strong past participle dug appeared 16c., but is not etymological. Related: Digging.
dig (n.) Look up dig at Dictionary.com
late 17c. as "a tool for digging," from dig (v.). Meaning "archaeological expedition" is from 1896. Meaning "thrust or poke" (as with an elbow) is from 1819; figurative sense of this is from 1840.