Shakespeare's villains are complex. Unlike the earlier antiheroes of the revenge or morality plays that were popular in Elizabethan and Jacobean culture, Shakespearean criminals lack the simple clarity of absolute evil. Claudius is a perfect example of a quintessential Shakespearean antagonist.
Claudius is socially adept, and his charm is genuine. He can exhibit deep distress over his "dear brother's death" and admiration for his wife, "Th'imperial jointress to this warlike state." He knows the value of a great funeral, but quickly turns mourning into celebration and moves on "With mirth in funeral and with dirge in marriage" to whatever lies ahead. He is a decisive man, fair in his politics and commanding — if Gertrude's allegiance is any indication — in his bedroom.
The Queen has chosen to marry Claudius, and she defends him even to her son. In fact, she never opposes Claudius in anything. Were he dark and sinister in all things, she would fear and despise him; she follows him willingly even when he arranges to send her beloved son into the jaws of death. He must be sincere in his love for her. He explains his feelings for her at the end of Act IV, but he has proven these feelings consistently throughout the play
The Queen his mother
Lives almost by his looks, and for myself,
My virtue or my plague, be it either which,
She's so conjunctive to my life and soul
That as the star moves not but in his sphere,
I could not by her.
A character who loves is not merely a cold-blooded killer. Like Hamlet, his conflicting imperatives tear him apart.
Whereas he recognizes that he his "offense is rank" and "smells to heaven," he also admits that he will not make amends with God because he refuses to give up what his crime has bought him. He is willing to take the consequences of his actions.
In some ways, Claudius exhibits more heroism than Hamlet. He manipulates fortune and takes what is not rightfully his, but remains unapologetic for his actions; he possesses enough strength to admit that he would do the same again. Hamlet, torn by conscience to smite the morally deficient Claudius, causes the death of six innocent people before he accomplishes his goal. By taking full responsibility for his actions, Claudius mitigates his evil nature.
The mark of a great Shakespearean antagonist is how completely he mirrors the protagonist. Claudius is no more Machiavellian than Hamlet; both ultimately believe that the end justifies the means, and both ultimately sacrifice humanity and humaneness in the acquisition of their goals.
What makes Claudius a villain is that he is wrong, and Hamlet is right. Claudius is a sneak who murdered and lied. Hamlet commits his murders in the open and suffers the pangs of his own conscience. Claudius subverts his conscience and refuses to ask for divine forgiveness. Hamlet seeks contrition and absolves himself of guilt before he dies; Claudius receives no absolution and seeks none. Hamlet will spend eternity in Heaven; Claudius will burn in Hell.