The way jokes usually work is that they cause you to connect two things in your mind that you hadn't connected before, and if it happens quickly and surprisingly, you laugh. Humor induces thought. Those without the information inside won't "get the joke." No one gets all jokes, but the more we know the more we'll get.
Over the next few days when something funny happens you might want to take a moment to think about why it amused you, and what you needed to know to understand that joke. (There are many studies and analyses of humor, but they're never funny. Some are written in such stilted jargon that THAT is funny!) I do not recommend discussing this with young children. They don't need to know how humor works. They need to have parents who appreciate their laughter and who can find even more things to amuse them and help them do the mental gymnastics necessary for that happy laughter to arise.
Photo by Kirby Dodd by... someone who picked up the camera.
I will credit better if someone remembers.
__