For a pet, any of the two can do but most people prefer a cat since it is smaller. Due to its size, the cat does not cost as much as a dog and its maintenance is easy and less costly. Cats are also preferred as pets by busy people since they do not have to walk them.
A dog is better if you want something to snuggle up with, although its harder to take care of. A cat is better if you want to occasionally love on, but not have so much responsibility in caring for it.
I prefer cats. If you like a pet to constantly play with, get a dog. They need constant care and can't be left alone for too long. If you want a companion to pet when you're bored, but don't want it to bother you all of the time, get a cat.