Paronomasia is the technique of using a pun, or a joke based on multiple or possible meanings of words. Shakespeare was the king of paronomasia.
Most examples of paronomasia are funny, a clever play on words, although it's also used for emphasis in rhetoric or as a poetic device in literature. Newspaper and website headline writers are known for using paronomasia to catch readers' attention."Otter Devastation," for example, the headline on a story about environmental changes affecting otters, sounds like "utter devastation," a common news phrase. In Greek, paronomasia means "play upon similar-sounding words."