Has your hamster broken her leg if she is holding it up and putting it down every few steps?
Your hamster could have got a bad sprain or a bad bruise. Feel around her leg and if you feel a broken bone, bring it to the vet. Only the vet can deal with tiny broken bones. If you don't feel anything broken, then the only answer could be a sprain or bruise. The most common reason is the wheel. If it is an open-barred wheel (it has holes in it) the hamster could have tripped on one of the holes and bruised the leg. Get a closed hamster wheel and make an appointment for the vet. Just to make sure.