I think that Draco might have a thing for Hermione and he pretends to hate her to hide his true feelings.
As you can probably tell, guys tend to tease people if they like them and that is what
Draco does repeatedly. Even by calling her a 'mudblood' could be him showing his
affection for her. In book 2 he tells her to watch out because the heir of Slytherin
was going to go after mudbloods. Maybe he was just warning her. I don't think
she likes him though you never know.
h