Idiom: To hit the nail on the head - get it right, get it, guess correctly, speak (the) truth
Context #1 – Students are in English class
Teacher: OK. Can anyone tell me what the word “affluent” means?
Student 1: To be sick?
Teacher: No, that’s not what it means. Good try, though. Anyone else?
Student 2: To have a lot of money or to be rich. For example, the new US president is very affluent.
Teacher: That’s right! You hit the nail on the head! That is exactly what it means and you gave a good example.
Context #2 – Two friends talking about a couple they know
Sara: Did you hear what Jim said about Winnie and Bill?
Pat: No, what did Jim say?
Sara: He said that Winnie and Bill are getting a divorce!
Pat: What? Jim hit the nail on the head! How could he possibly know that? I didn’t think anyone else knew about it.
Sara: Well, Jim overheard them fighting on Saturday and they must have mentioned it.
Meaning: To hit the nail on the head means get an answer to something correct or to speak the truth. In context 1, the second student answers the teacher's question about what the word means. In context 2, Jim speaks truthfully about his friends getting a divorce.