The classic joke "Why is six afraid of seven?" is a play on words and numbers. The traditional answer is: "Because seven ate nine." This sounds like "seven eight nine," which makes it a pun suggesting that seven "ate" (as in consumed) nine, so six is afraid because seven might "eat" it next. This joke relies on the homophone between the number eight and the word "ate" for its humor.
There are also humorous and creative alternative explanations and variations, but the core pun is based on the play of words among the numbers seven, eight, and nine.