If you truly want to understand the character of Dexter you need to read a book called, "Without Conscience" by Dr. Robert Hare. Dexter is a psychopath, which means he has no true inner emotions. Every time he smiles or frowns, he is acting for the sake of those around him. Psychopaths make great actors (think about this the next time you wonder why there is so much immorality in Hollywood). Like all psychopaths, he is charming and manipulative. Only his police chief seems to realize he's a psychopath, while the other cops think he's just a great guy.
Flashbacks tell the story of Dexter and his father, Harry. His father, a cop, realizes Dexter is a psychopath after he finds a hole filled with dead dogs. The two talk about this while on a boat in the middle of a lake. His father just happens to know a lot of guilty men who need killing. Instead of drowning his son, his father decides to teach Dexter how to hunt other killers. This becomes what Dexter calls "The Code of Harry".
The writing and acting are brilliant. I can tell they have read extensively about psychopaths because they have the characteristics of psychopaths down cold. The eyes look slightly different, dogs sense he's not like other people, and he manipulates people at every step, bringing in donuts and engaging in friendly banter - even though inside it means nothing to him. Psychopaths can also learn to follow moral codes, just as Dexter does.
They got the sex part wrong, though. Most psychopaths seek instant gratification and usually overindulge in sex, drugs, alcohol, or anything else that gives a rush. Also, his girlfriend doesn't like sex because she was raped by a druggy, when in fact women who have been raped seem to go the other way in terms of sex, becoming perverted. But maybe not all the time, so the writers deserve the benefit of the doubt on that.
There's a few improbable things by the writers. Namely, he's on a date and glances over his shoulder to see a crime scene that happens to be by the same criminal he was researching. Miami is a big place, and the chance of just happening on the crime scene at the same place and time as the other cops is so improbable that the show loses some credibility there. Overall this looks like the show could go in some interesting directions.