Readers like the bad boy more than the 'nice guy'. There's another character that wins us all over - The Jester.
The Jester, or the Fool is a traditional character that adds wit to a story. Their purpose is not only for laughs though, they are often pertinent to the progress of the narrative. Shakespeare's jesters were traditional political humorists, it was their job to keep the King grounded by mocking his political decisions (much like comedians do for politicians today - like The Chasers show). But what if you're not by nature a comedian? Is it hard to write humour? I think it's no harder or easier than writing any style you're not used to (my weak-writing is in romance). So what type of humour should you employ?
The witty character that is always coming up with quick one-liners. Sometimes these remarks are at the expense of others, this makes the character seem a little heartless. Cordelia from Buffy or Dr House from House are examples. There's two ways you can deal with that; make the receiver of the wit deserve the line, or, make your witty one-liner character get their just deserts at some stage. This is the Trickster character, everything he does is for his own amusement.
He's there for us to laugh at. He gets it wrong, but monumentally wrong. He's goofy and harmless, but at some stage in the story, despite all our assumptions of this character, he will actually help the situation where no one else could. No one will be more surprised than the fool. Think Ron Weasley from Harry Potter, or Morgan from Chuck.
Sometimes life is funny. We get ourselves into things that seem so absurd that we can laugh at them latter, these make great novel moments. You can draw on family stories or your own to create a humorous situation.
For example, I don't swear, well, not the really bad words anyway. While at Uni, I took a course called Psychobiology of Sex, mostly it was about monkeys and alpha-males, but a little touched on the language we humans use. We were asked to write down all the names we knew, including swear words and slang for the female anatomy. Some of mine just used the first letter, followed by dashes. The teacher asked me to read my list. OMG. My face went red and I just read out the first letters. The teacher pushed me to read out the C word. No way. She kept at me and insisted it was just a word. She said it several times. No way. Next, she got the rest of the class to chant the word so I could join in. No way. This went on painfully for about 5 minutes, with the whole class chanting C..., C..., C... I kept seeing students walking past our open door and wondered what they must think of the situation. It was bizarre, like a weird dream where you realise you have a test for a subject you don't know and you're naked. Anyway, it was weird enough to be funny.
Humour can reveal an oddity in what we accept day to day. It can be used in fiction as a way of mocking itself (Pretty Little Liars had a scene in the woods with four scared teens, a branch cracks and a girl says to the others, 'Did you hear that?' This happens all the time in movies, but this time, one says "Well, yeah, I'm standing right next to you."). It can also break the tension, it's very common after a fright for people to laugh, it's our body's way of using up all that adrenaline. Humour is a good way of introducing the unexpected. Plus, humour just makes stories fun. (Click on the pic to read a funny)
Here are some more links to help you with writing the funny:
Make Your Writing Funny - A great post on All Freelance Wrting, with specific examples. I found this most helpful when trying to funny-up one of my characters.
Building Characters with Jung - One of my previous posts, includes a chart of character types and what their motivations are.
Top Ten Tips for Writing Humour - A few ideas for you to play with.
Write on the Funny - Gives some funny scenarios.