Make sure your feeding the hamster right and giving it water everyday if your really unsure what to do then take your hamster to someone that knows them really well eg: vets and other places dont just let your hamster sit there in pain,
also try stroking your hamster that might work but stroke it very gently and try holding it and look at it's body for any thing bad or anything strange. If you have a cold then it might be best if you stay away from the hamster because if a hamster catches a cold then it would be very ill and it might die just watch out for your hamster.