Actually, this is a very common question I get asked almost on a daily basis, so I thought I would address it.
First of all, separate your hamsters for now, while you read. Let's say your long-time friend and companion dwarf hamster, Suzie, was all alone in her cage, happy as a clam. You decided that two hamsters is better than one and figured Suzie needed a new friend. So you went out and bought Sam. You brought Sam home, stuck him in with Suzie, and wished them a good life. But, lo and behold, Suzie started fighting Sam! What do you do now?
Well, my answer will be surprisingly simple. This will work whether you are putting together two females, two males, or a male and female. It all has to do with scent.
First of all, remove all hamsters from the cage and clean it out. With water and a mild detergent, like Dawn or Joy, completely clean out the cage to remove odors. Carefully dry the cage and put it back together. Fill it with plenty of bedding, food, water, and toys.
Now, here is the crucial part. Put your new hamster in FIRST. But, if you are introducing a male and a female, put the male in first no matter what. Let the new hamster, or male, roam around in the cage by itself for about 30 minutes to an hour so it can establish its scent. When the time is up, put the other hamster in. Since males are not as aggressive about their territory, females tends to let them be the boss. Watch them for a while. As long as they don't hurt each other, they will be fine. Otherwise you'll have to go with plan B. Now, usually this first method will work, but there are always some hamsters out there who just don't want to cooperate.
You will need a mesh cage divider. Put it down the middle of the cage (it will probably work best with an aquarium). Put food and water on both sides and put each hamster on the opposite side. Make sure they can smell each other. Leave the divider up for a week. Then, remove it and watch. If they continue to fight, repeat this procedure.
Sometimes, it all depends on the hamster. Some are stubborn, others are very willing. You will just have to use your own common sense. If they are bleeding, you need to separate them. If they just squeal at each other now and then, you can leave them together. Soon, you will have inseparable hamster buddies!
Here's some advice I've learned from lots of experience: if you don't want babies, it is best to get two females to live together. Two males are much more difficult because it is hard to get them to get along after they have sexually matured. Females may fight at first, but it usually doesn't take long before they agree with each other. If you want more than one hamster but no babies, I would highly recommend getting two young females. They will enjoy each other's company their whole life.