When you use language in a witty, clever way, you use wordplay. A pun like "the chicken crossing the road was poultry in motion" is an example of wordplay.
Wordplay, a word that dates from the mid-1850s, simply means "playing with words." Besides puns, wordplay includes verbal games like double entendres and literary techniques such as meaningful character names — like the werewolf Remus Lupin in the Harry Potter books, whose last name comes from "wolf" in Latin, lupus. Another type of wordplay is a "Tom Swifty," a phrase linking an adverb to a sentence with a pun: "I hate shellfish," she said crabbily.