Pun
Pun is a Figure of speech. It plays with words to create a humorous or witty effect.
Example: The math teacher’s lesson on subtraction was too negative for my liking.
Literary Example: "Now is the winter of our discontent made glorious summer by this sun of York." – William Shakespeare, Richard III