Humor in fiction can take on many forms, but it’s always the character’s point of view that directs the reader to the humor.
I’m only going to touch on a couple types of humor. To do them all would be too exhausting.
Dark humor – this touches on something morbid or offensive in a funny way. Dark humor tackles the hot button topics most of us are afraid to touch in case someone gets offended by it. For example, if you’re writing a story where a man is so stupid he doesn’t realize he’s having sex with a dead woman and he thinks she’s just not into it (so he tries harder to please her), this could be dark humor. The tricky thing with dark humor is that is has to be done just right to resonate with the target audience.
Slapstick humor – this is physical in nature, and it’s usually exaggerated. Remember ever seeing someone slip on a banana? Or remember seeing a fight where people are throwing pies at each at each other? This is slapstick humor. The Three Stooges (if anyone remembers them) were notorious for this. The problem with this is that you can’t rely on this to carry humor out for long. After a while, this can get monotonous. So the best thing to do is spread it out and keep it short.
Satire – this is humor that makes fun of something or someone. Often these are situations or people most people are familiar with. For example, it could be poking fun at people in political offices. I saw some episodes where a night show host was making fun of everyone running for the current presidential nomination. The entertainer picks out some trait in the person and exaggerates it so it’s funny. Another example could be calling a customer service representative about a problem you’re having with your cable bill. You could have the character on hold, talk to someone who directs them to another number, gets put on hold again, gets another number to call, etc. The reason satire is funny is because most people can relate to it.
Misunderstandings – this is the kind of humor I like most when writing fiction. It requires the reader’s knowledge of the character’s point of view to get the humor. In my opinion, this is psychological humor because it stems strictly from the character’s thoughts and requires the reader to get the subtle nuances. For example, in one story, I wrote about a hero who was falling in love with his wife, and a group of men kept flirting with her. The wife, however, had no idea they were flirting. So when I was in the hero’s point of view, I would have one of the men come up to his wife and say things that were obvious pick-up lines. The hero was panicking the whole time, but the wife (still unaware of what was really happening) misunderstood why the men were coming up to talk to her. It’s a subtle humor, but humor all the same, and it’s only something the reader, who knows what is really happening, can truly appreciate because neither the hero nor his wife were laughing.
The conclusion to all of this is that you consider your point of view character’s personality when you do different types of humor in your story. What will be funny with one character won’t be funny if you do another one.