Contrary to what one of history's great minds, Peter Venkman, would have you believe, cats and dogs living together is not always a sign of mass hysteria. Cats and dogs have been kept by humans pretty much since the dawn of time because they are very social (and fuzzy!) little creatures. Consider that domesticated dogs and cats are both natural predators, but they put aside whatever drive they might have to eat us or attack us in exchange for being allowed to sleep on the bed, and you can see that they're already pretty much pushovers.
Even cats, who will pretend they don't need us, adopt us as their families, recognize us, miss us when we're gone, and generally like having us around. Dogs, of course, being pack animals, will readily extend their sloppy dog kiss love to all members of the household, given proper introductions.
It's often said that a pet is only as good as its people. If you don't train your dog not to chase cats, it will. If you don't train your cat not to attack anything that tries to sniff its butt, it'll claw your dog's eyes out. However, unlike learning to sit or not poop on the neighbor's lawn, this seems to be the kind of training an animal needs to receive as a baby.
Baby dogs and cats are both still territorial to some degree, but they're also easily distracted and not very convincing. Dogs and cats need to be introduced to other species they're expected to make nice with at this crucial stage. There may still be barking and hissing, but that will eventually devolve into copious butt sniffing and before you know it, they're playing chase.
If you're the sort of kind soul who rescues animals, you already know you get what you get. Of course the shelter will help you find a dog who is at least cool with cats, or vice versa, but they may never become best friends. And some pets have a natural sort of speciesism that precludes their ever really bonding with a dog or cat.
So, no guarantees about them playing together and providing you with hours of ooohs and aaaahs. But, here is how you introduce opposite species so they don't try and kill each other:
When you first bring the newer animal into your home, hold it and give the resident animal a chance to sniff it. Seeing you holding it gives the resident animal a clue that whatever you've got there, it isn't prey.
Bring them into the same room. Set the new animal down and hold the resident animal still. Presuming you've followed my advice, the new animal will be a puppy or kitten and naturally curious. It will want to sniff every crevice of its new surroundings, but will eventually work its way over to the animal you're holding. If during this process the older animal growls, hisses, or otherwise shows agression, reprimand it quietly - you don't want to scare the already nervous new addition.
If you can't get the older animal settled down, put it in a kennel or carrier with windows if you have one, or the bathroom if you don't. Make the older animal remain confined until he or she settles down, then repeat: pick up the puppy/kitten and let the older animal check it out, then let the new animal go and hold the older animal while you give the young one the same opportunity.
At some point, the younger animal will test the older one's boundaries and likely be snapped or swiped at. Tell the older animal "No!", just loud enough that they both understand it as a reprimand. It's ok if they both think they've done something bad (though you want to be making eye contact with the older one when you say it). The older pet needs to learn to be patient with the baby, the baby needs to learn to give the older one its space.
Provided your animals don't have inborn biases against the opposite species, you'll go through this a couple of times but, eventually, the older animal will relax. If they're inclined to be friends, it may even let the baby climb on and nip at it. When it gets annoyed, it will mostly stand and walk off, rather than showing aggression.
If something goes awry in this process, you'll know it. It's normal for your resident animal to make warning noises, but if at any point they attack, you've got problems. Again, I'm not talking just a growl and some raised fur, but full-on "I'm gonna eat you" mode. However, if your pet is going to react this way to the other species, you'll generally observe this behavior beforehand and won't be foolish/cruel enough to try and bring another animal into the house.
(If you have both a puppy and a kitten - babies, mind you, not eight months - you can disregard most of this. Just plunk 'em down together and they're usually good to go.)
Of course, if you've been around pets, most of this stuff is obvious. But you might, as I did, freak out a bit when you get your new pet home and want some direction or reassurance. So, don't worry! Cats + dogs != human sacrifice.