Stephen King is the king of horror writers, by some accounts. His works have become synonymous with all things that are creepy. Although known for his horror works, he also is the author of really great short stories. The Shawshank Redemption, being just one of these. He uses humor often in his books, to help lighten the mood for just a bit, before hitting you with something extremely terrifying.
One example of humor is in the story It. Pennywise, the clown in the book, uses humor to terrorize his victims. There is something really creepy about an evil clown trying to be funny, while also trying to kill you. In The Shining, Jack Torrance becomes the caretaker of a haunted hotel. He slowly goes mad and uses humor, to also terrorize his family. The ghosts of the past are taking over his personality. Stephen King doesn't just use humor in his horror stories though, he also uses humor in his other works. In The Body, a novella by Stephen King, he uses humor. The Body, turned into a movie named Stand By Me, he tells a story of how a boy enters a pie eating contest, just to end up throwing up on everyone.
As you can see, Stephen King is a master of his craft. He blends horror with humor. He can also weave a tale of how young friends struggle to overcome bad childhoods, by inserting humor to lighten the mood. It is a great writer who can have you on the edge of your seat one minute, then in the next instant have you laughing. This makes him truly is a master.