So, if I created a character that had particular quirks or mannerisms, what would that look like? This is a huge problem when writing anything because the common thing to do is go overboard and do too much mannerism!
In my upcoming book, I had this character on the fringe. He's meant to be an oddball, not really because he's stupid or slow, but because he has lived on his own in seclusion for quite a long time. Experiences like that change people, make them weird, etc. Characters that express odd behaviors should derive these habits for logical reasons.
So mannerisms should start here: beginning with a habitual circumstance or behavior that sheds light on the character.
All mannerisms must express a facet of the character's personality. Captain Jack Sparrow's slow, lackadaisical movements are supposed to typify a drunk pirate, which is the stereotype we are all familiar with. If your character works at a desk, let him fumble with paperclips or lick the tip of his pen. This characterization can be taken further if you like. Mannerisms can also shed light on the internal motivation and drive that the character possesses. The inherent organization of a character's desk highlights his/her fastidiousness. A general who looks at a pocket watch in the heat of battle emphasizes his callousness in the face of inhumane carnage. You get the idea.
Something to consider in all this brings us back to our original problem: how much is too much? One of the distinguishing characteristics between a mature and an immature writer are the presence of tired out mechanisms in the writing, and mannerisms are the chief offender. My rule of thumb is to only have an instance of mannerisms at the beginning of a "beat" or new period of narrative action. If a character is the kind of person to have a short temper, make them swear when opening up a difficult pack of cigarets. Or, if your character is prone to complain, have them whimper occasionally.
Ultimately, mannerisms should be used diplomatically. Make them aspects of a character, not the sum, and you will go far.