A pun is a joke which is a "play on words." People make puns in order to make other people laugh. Many jokes are actually puns. A pun usually uses a word which can have more than one meaning, even if the spelling is different:
Sometimes a pun may use a whole phrase that can be heard in more than one way, as in the following knock-knock joke: