According to the lineage texts on prayer wheels, prayer wheels are used to accumulate wisdom and merit (good karma) and to purify negativities (bad karma). In Buddhism, Buddhas and Bodhisattvas have created a variety of skillful means (upaya) to help bring practitioners ever closer to realizing enlightenment. The idea of spinning mantras relates to numerous Tantric practices where the Tantric practitioner visualizes mantras revolving around the nadis and especially around the meridian chakras such as the heart and crown. Therefore prayer wheels are a visual aid for developing one's capacity for these types of Tantric visualizations. The spiritual method for those practicing with a prayer wheel is very specific (with slight variations according to different Buddhist sects). The practitioner most often spins the wheel clockwise, as the direction the mantras are written is that of the movement of the sun across the sky. On rare occasions, advanced Tantric practitioners such as Senge Dongma, the Lion-Faced Dakini spin prayer wheels counterclockwise to manifest a more wrathful protective energy. As the practitioner turns the wheel, it is best to focus the mind and repeat the Om Mani Padme Hum mantra. Not only does this increase the merit earned by the wheel's use but it is a mind stabilization technique that trains the mind while the body is in motion. Intoning the mani mantra with mindfullness and the "Bodhicitta" motivation dramatically enhances the effects of the prayer wheel. However, it is said that even turning it while distracted has benefits and merits and it states in the lineage text that even insects that cross a prayer wheel's shadow will get some benefit. Each revolution is as meritorious as reading the inscription aloud as many times as it is written on the scroll, and this means that the more Om Mani Padme Hum mantras that are inside a prayer wheel then the more powerful it is. It's best to turn the wheel with a gentle rhythm and not too fast or frantically. While turning smoothly keep in mind the motivation and spirit of compassion and bodhichitta (the noble mind that aspires to full enlightenment for the benefit of all beings). The benefits attributed to the practice of turning the wheel are vast. Not only does it help wisdom, compassion and bodhichitta arise in the practitioner, it also enhances siddhis (spiritual powers such as clairvoyance, precognition, reading others thoughts, etc...). The practitioner can repeat the mantra as many times as possible during the turning of the wheel, stabilizing a calm meditative mind. At the end of a practice session there's a Tibetan Buddhist tradition of dedicating any accumulated merits that you may have gathered during practice to the benefit of all sentient beings. Then Om Ah Hum 3 times. This is customary with Tibetans upon completing any Buddhist practice including the practice of the prayer wheel.
Thubten Zopa Rinpoche has commented that installing a prayer wheel has the capacity to completely transform a place "...peaceful, pleasant, and conducive to the mind." Simply touching a prayer wheel is said to bring great purification to negative karmas and obscurations.