Word play is the figurative category that Shakespeare and Groucho Marx shared most in common. A pun is only the most widely known type of word play. There are other ways to play with words.
Assigning to a proper name its literal or homophonic meaning. “Falstaff: Is thy name Mouldy? Mouldy: Yea, an’t please you. Falstaff: ‘Tis the more time thou wert used. Shallow: Ha, ha, ha! most excellent, i’ faith! Things that are mouldy lack use: very singular good! in faith, well said, Sir John, very well said.” Henry IV Pt2, 3.2.96. Related to Paronomasia and Polyptoton.
Witty joke where a word or phrase is turned on the user. “Katherine: What is your crest? A coxcomb? Petruchio: A combless cock, so Kate will be my hen. Katherine: No cock of mine. You crow too like a craven.” Taming of the Shrew. 2.1.209.
A modern term for the classical rhetorical figure Acyrologia, a malapropism is confused use of words in which an appropriate word is replaced by a similar-sounding but often ludicrously inappropriate meaning. Malapropism is a neologismA new, deliberately invented word. inspired by the name of the character Mrs. Malaprop (which is an abbreviated portmanteauA neologism created by combining two words. for mal-appropriate) in Richard Sheridan’s The Rivals, 1775. For examples in Shakespeare, see Acyrologia.
A play on words, sometimes on different senses of the same word and sometimes on the similar sense or sound of different words.