Comic Relief: Writing is all about balance. You need to bring the tension up and release it with relaxation or humour. Give the reader a break so he can keep reading without forcing a break by putting the book down.
Comic Relief Part 1: The Comic Perspective
Comedy comes from character. The foundation of the comical character is a strong comic perspective. It is his unique way of looking at the world, which greatly differs from a normal view. The stronger they differ from a common perspective, the funnier they are. To create it, make use of exaggeration.
Example: Anxious - jumps at shadows
Comic Relief Part 2: The Flaw
It’s only funny if it happens to someone else. You can draw a direct relationship between a character’s flaw and how funny he is. A flaw is a failing, or negative quality of a person. Giving your character a flaw separates the character from the audience with enough distance to comfortably laugh. Make him the “other guy”. This flaw can be anything, whether it’s a personality trait or physical flaw, as long as it’s strong enough to discourage people from identifying with him. Whoever he is, he isn’t like me. In the strongest characters, flaw and perspective are in competition, as a sort of inner conflict. The flaw is his true nature, the comic perspective is his fantasy self-image.
Example: a shy stripper
Comic Relief Part 3: Humanity
You’ve created distance between the comic relief character and the audience, now pull the audience closer. Make him likeable, by giving him something in common with the audience. Humanity bridges the gap the flaw creates, so the audience will care about the character. A classic way of achieving that is by giving him enough morals to do the right thing when times are challenging, or by making him a romantic. For every flaw, there should be a humanity aspect, even if the flaw is part of his humanity.
Romantic - Honest - Loyal - Vulnerable
Mix it up to form an interesting, complex character which comic perspectives, flaws and likeable traits. Build his personality in layers