We colloquially group cats and dogs together because we keep domestic versions of both of them as pets, but they are different animals that have evolved to fit different niches. Cats and dogs are both in the Carnivora order, but their last common ancestor lived about 42 million years ago.