Pun
Puns do not have to be about homonyms. They can sometimes be a double entendre using both a literal sense of the word and a metaphor (figurative use). For example, if a young man joins the Navy and someone says that he "sailed through his exams", this is a joke because: 1) the expression "to sail through something" means "to do it easily", but 2) the Navy is about sailing in ships. It is possible to say something like that without realizing that it is a pun.