The Tibetan terms for prayer wheels can be translated as "hand wheels" or "dharma wheels" but most commonly they are called, in Tibetan, "mani wheels" because of their usual association with Avalokiteshvara, Bodhisattva of Compassion and his mantra (the "Six Syllables"), "om mani padme hum". Mani, "jewel", and padme, "lotus", are Avalokiteshvara's emblems, hence the mantra should be understood as "hail the jewel-lotus". It is this mantra, repeated "endlessly", which is typically written or printed on paper and would tightly inside the cylinder of a prayer wheel.
The benefits of spinning a wheel, while maintaining the proper visualizations and compassionate mind, are many. "Just being struck by a wind which has touched such a prayer wheel cleanses a great number of sins and obstacles to enlightenment and is said to implant the seed of liberation."