Dogs don't actually hate cats; they just have a potentially adversarial relationship with them.
For starters, dogs and cats communicate differently. For dogs a wagging tail is a sign of excitement, anticipation of something, usually good. For cats a wagging tail is a sign of anger and displeasure. While a dog may see a wagging tail, his own or a cat’s as an invitation to play or at least approach, for cats a wagging tail is an indicator to stay away. Thus a dog may scare off a cat with his own wagging tail or incorrectly assume the cat wants to play based on hers. Either way the message the cat is getting is to flee or attack if approached.
Another challenge to harmony for dogs and cats is the existence of prey drive. Many dogs and cats regard a moving animal as prey, especially if it looks like they could take them in a fight. Thus a dog who is usually larger than a cat will regard her as prey. It have even seen dogs smaller than cats who regarded them as prey, perhaps because their instinct to o hunt and self image come from a time before dogs were bred to be tiny. In either case, a cat may attack the dog first in self defense. In the case of a smaller dog, once the cat determines the dog is not much of a threat she may even turn on the dog regarding him as prey. I've seen dogs sizing each other up this way, and posturing (looking tough) seems to play as much a part in it as size.
That said, dogs and cats don't necessarily see each other as threats, some who live together are friends, but a dog and a cat who just meet, unless they are especially young (naive) individuals or uniquely social, are not likely to experience instant love. Repressed hostility is initially the best to hope for.