A pun is a joke that depends on how words sound.
Gorilla me a hamburger, would you? I'm feeling rather hungry.
Here, Gorilla, a big ape, is used to sound like the word "grill," a way you cook a hamburger.
This would NOT be a good pun. It's pretty awful, actually.
But a good pun is one that doesn't make you moan and wish you hadn't heard the awful joke.
Student or Learner