Some hamster species have longer tails than others, e.g. Chinese, but even Syrians have ickle ones.
This is a chinese hamster's longer tail. They are prehensile and used for balance and curling round things:
This is a syrian's stubby little tail:
Hamsters tails are important! Not having a tail is immediate disqualification for a hamster at a show. They can also give you a handy bit of skin to see if it's flaky or sore. I've found a ham with a flaky tail who had mites. Certain colours, such as dark grey, are prone to kinked tail. This looks sweet, but can lead to serious spinal deformities in offspring.
This is a kinky tail. Note how it curls up towards the back rather than sticking straight out like the other syrian picture: