Hamsters, like dogs, come in different breeds that have differing needs. Some subspecies of hamsters prefer living the solitary life, relaxing with their thoughts and spinning their wheels -- literally. Others appreciate a little companionship but can do without it. If your hamster is of a breed that tolerates company, you can experiment with introducing a friend ... but some hamsters, regardless of breeding, just prefer to live alone in their cage.
The Solitary Syrian
If you have a Syrian hamster, that's all you should have -- a single Syrian hamster. When Syrian becomes plural, you have problems. This breed of hamster prefers to live alone. So much so, in fact, that if they are caged together, they'll fight until one of them is once again by himself. If you're set on having more than one hamster, then feel free -- just make sure he lives in his own cage, or else things will get ugly.
Dwarf hamsters don't mind having a little company. In most cases, they can do with or without. These tiny companions don't generally suffer from loneliness the way a dog, cat or human might. If you're worried that your hamster is lacking stimulation, giving him some toys, puzzles or an exercise wheel is generally enough -- it may seem boring to you, his tastes are somewhat less refined. If you want to introduce a companion, you can. But you have to follow some precautionary protocols to make sure that it all goes according to plan.
Introducing Two Hamsters
When you're ready to introduce two hamsters, you should do so slowly. Keep them in separate cages in close proximity for at least two weeks. This allows them to become accustomed to one another, while also waiting out the Humane Society's recommended quarantine period for your new pet. When it comes time to introduce them up close, you should ideally do so by placing them both in a fresh cage so that neither feels encroached upon. If that isn't possible, though, it's generally best to introduce the female into the male's cage or the older animal into the younger animal's cage. This makes territorial aggression less likely, although it's still a likelihood.
After introducing your little friends, you need to keep a close eye on them. All hamsters are different, and some of them really do prefer to be alone -- and they won't be afraid to show it. A territorial hamster won't hesitate to use lethal force on another, so if yours seem often embroiled in battle, it's best to separate them before anyone gets hurt. In some cases the squabbling is temporary; in others, it ends in tragedy. You and your companions are better off playing it safe.