You can't train your hamster in the same way you can a cat, dog or even a bird, but you can condition your pet to respond in a repetitive manner. Hamsters will respond to familiar voices and repeated actions, so with a little patience, you can produce simple trick-like effects.
To teach your hamster to stand on his haunches, offer bits of a yogurt drop or other treat foods just above his head.
To get him to run through a tunnel, take advantage of your hamster's natural curiosity and love of burrowing. Set up a series of dye-free cardboard tubes, those from toilet paper and paper towels work well, and sprinkle seeds along the route as an incentive for him to keep moving. Your hamster will search out the food until he reaches the exit. With repetition, he should eventually travel for you with just a seed reward at the end of the journey. This training technique also works for cardboard mazes, where you can observe him from above. Always make sure your hamster can easily fit through the tube.
To train your hamster to be lifted in your open palm like an elevator, offer bits of vegetables or a single sunflower seed in your hand during the taming process. The treats will help coax your pet to move into your palm. After his being in your hand becomes an established behavior, you can lift him easily. Once he's in your open hand, always avoid rapid or swooping gestures that may startle your hamster and make him fall. Warning:
Never shout, clap or purposely startle your hamster to get him to stand, burrow or flop over. Your pet's natural defensive postures and behaviors are triggered by fear and anxiety and stress can lead to an unhealthy hamster.