It's called bruxing in the rat world. It's a sound that they make when happy, content, angry or nervous and can be compared to a cat purring. I first used to noticed it when one syrian could smell another on my hands. A lot of people still think it is only a sign of an angry or nervous hamster. But I have seen it with content and happy hamsters too.
Sometimes when they get really into the bruxing they can also do what is called boggling. It's can be difficult to explain right. Here's a video of a rat boggling:
Clicky. And also a video of my girl Patch (not good quality at all) boggling and bruxing:
Clicky.