It could be any number of things. If living with other hamsters, it could be a bite that has swollen into an abcess. It could be a tumor, rectal prolapse, intussuseption (abnormal intestine), or severe constipation/diarrhea. Some of these conditions are easily treatable, some are dangerous. Please take your pet to a qualified exotics vet asap for an exam.