The pun, also called paronomasia, is a form of word play that exploits multiple meanings of a term, or of similar-sounding words, for an intended humorous or rhetorical effect.
a joke exploiting the different possible meanings of a word or the fact that there are words which sound alike but have different meanings.