That’s a prayer wheel. The writing on the outside is a prayer or mantra, and by spinning it, it basically has the same effect as chanting it. I’ve also heard the idea of the spinning motion “purifying” the air in a metaphysical way, but I don’t know if that’s just a notion attached on later by new-agers.

By the way, there’s a funny scene in the movie “The Golden Child” where Eddie Murphy sees people in the temple spinning the wheel as they talk to the monk, so when it’s his turn to talk he moves it back and forth like a scratch record, and raps over it.