The Comic Relief
The comic relief is an archetypical character found in most lighter works and many heavier ones. In the lighter works, he is often there to add humor and balance things out. In heavier works, he lives up to the "relief" part of his name. When things get intense or depressing, he lightens the mood. He's important to both categories, but like any character, he can be abused too.
Lighter stories often have the comic relief character as part of the main cast. Her services are called on more often, since a lot of light works are written for the purpose of being funny. The result can be hilarious, obnoxious, or trigger heated arguments among readers as to whether she's hilarious or obnoxious. To avoid a definite fall onto the obnoxious side, it's best to keep her exposure down to a reasonable degree. Humor is like salt. If you use the right amount it greatly enhances things, but too much and you're cringing. If she's taking over plot-relevant conversations with her nutty remarks, tone her down a bit. Another important action is to give her a personality besides being funny—real people are a diverse blend of likes, dislikes, outlooks, moods, opinions, and patterns. You never know…with a little thought, an annoying, one-sided laugh-inducer may develop into a truly interesting and likeable character.
Heavier stories often place the comic relief character in the secondary cast. He comes up when things are getting too dark, too depressing, too scary, and so on, and you need a way to lighten the mood before readers get frustrated or disturbed. This is not to say you should throw him into every serious situation to start blundering around or making irrelevant remarks—there's a difference between "lightening the mood" and "ruining the mood." If your aim is to have the readers on the edge of their seats for a scene, and comic relief would make them lean back into their recliners, then don't use it. However, if you're in an entire plot arc that's very serious, especially if it's more so than the other arcs, consider using this character. Think of him as a counterweight: When the serious side gets too heavy, he sits on the lighter side and balances it out. Even so, keep his exposure down. He's there so your readers can breathe, not to turn things into a comedy.
Overall, the comic relief can be a very useful character. She makes you laugh, and people like to laugh. She keeps you from suffocating (unless it's from laughter). And besides that, she can become an engaging character on her own. So long as you use her appropriately, you hold in your hands the potential to create the readers' favorite character.