Hamsters will usually ignore other types of pets and perhaps fight with other hamsters. It is important that you do not house syrians and dwarfs together. I have heard of an owner who put together a winter white and a campbell russian without problems but these arrangements are generally not advised as well.
Hamsters will bite guinea pigs and rabbits if these are placed together with them in their cages, even when they are much smaller than them. I've seen hamsters with guinea pigs before in some shops and you will have to check for injuries before purchasing them or choosing another place to obtain your hamster. Dogs and cats can seriously injure your hamsters so do be careful. Some dog breeds have been bred especially as ratters (e.g. terriers) and it comes as second nature to attack the little critters. Cats, as everyone knows, love to chase objects and play with them in between their claws - this is obviously a dangerous situation for your hamster.