to hang: to fasten something at one point and leave it dangling there, and so also to rest one thing's whole weight on another
The picture behind this word is simple and physical: something is fastened at the top and left dangling. A millstone tied around a neck. A snake fixed onto a hand. The one Greek verb covers both the act of hanging something up and the state of hanging there, so it can describe the person who does the hanging and the thing left swinging.
Four of its seven uses in the New Testament describe an execution, and all four say the same striking thing: Jesus was hanged on a tree. That is not the ordinary verb for crucifying (σταυρόω), and it has nothing to do with a rope. It is the wording of an old law in Israel about a condemned man's body fastened to a piece of wood and left in public view, a body that law called cursed. The Hebrew verb in that law (תָּלָה) is the one this Greek word translates. Peter in Acts and Paul in Galatians reach for it on purpose, so that the cross is heard against that older text.
The remaining use turns the image into a claim about dependence. All the Law and the Prophets hang on the two great commandments, the way a full load hangs from a single hook: take the hook away and everything comes down. English happens to keep the same picture, so that sentence still sounds natural in translation. A compound built on this verb (ἐκκρεμάννυμι) does something similar for attention, describing a crowd that hung on every word Jesus said.