What then, is a pun?
There’s much confusion among pun-lovers and pun-loathers alike over what it technically means to pun.
The following passage is helpful:
“A pun is made when someone notices that two different words [or phrases] sound the same, and constructs a sentence containing this sound…. e.g: ‘The excitement at a circus is in tents.'”
~Upon the Pun, Paul Hammond and Patrick Hughes (W.H. Allen, 1978)
A pun is NOT the same as a play on words. Observe:
“A play on words [or double meaning] is when someone notices that one word has two different meanings and constructs a sentence containing this word…. e.g: ‘The architect in prison noticed the walls were not built to scale.'”
A pun (usually) relies on something called homophony, ie the ‘sound similarity’ of words or phrases having different meaning. But a play on words is homonymic, ie the same word has divergent meanings. A double entendre is, according to Hammond and Hughes, “a play on words, one meaning of which is lewd.” So a double entendre is not a pun either.
There’s a lot of other fancy wordplay-names pertinent to this site, e.g chiasmus, metathesis, melding, portmanteau, spoonerism, malapropism, conundrum, etc etc. the list goes on. But you can Google those terms yourselves – the joy of lexicographal self-discovery lies in the journey!