To hit the nail on the head means to come up with the perfect solution to a problem, or to express a thought with precision.
If you’re a carpenter, you know that missing the nail and striking the wood will damage the wood. The perfect solution, of course, is to hit the nail squarely and drive it home.
The origin of the phrase is unknown, but it is very old. It appears in The Book of Margery Kempe, circa 1438, which is an account of the life of religious visionary Margery Kempe and is thought to be the earliest surviving autobiography written in English. In modern English, the quote reads as: “If I hear any more of these matters repeated, I shall so smite the nail on the head that it shall shame all her supporters.” Her meaning isn’t clear, but perhaps she meant “speak severely.”
In the interests of precision, here are some more “head” phrases:
Head start — begin something early to get an advantage
Off the top of one’s head — impromptu response
Put your heads together — join with others to solve a problem
Drum into your head — teach you by intense and frequent repetition
And those are all the head games I’m playing today.