The traditional Hindu worldview accepts possession by gods, ghosts, and spirits, albeit whether this is beneficial or negative depends on the character of the entity responsible.
Possession is the most frequent way for village deities and some
manifestations of the Goddess to connect with humans, however it is almost
never used by the pantheon's top gods.
Possession by a god may confer great religious prestige, but
it is often thought to be physically demanding; via the medium, deities can
communicate with humans, both to express their intentions and to provide
assistance and guidance to people in need.
The yearly pilgrimage to Kataragama in Sri Lanka is one of
the most remarkable examples of this.
Devotees (bhakta) are thought to be speaking for the deity
Murugan while hanged from trees by hooks inserted into the skin of their backs.
Possession by departed spirits (bhut or pret), witches, and
other malefic creatures is always seen as an inappropriate occurrence and a
harmful imposition on the victim that must be removed as quickly as possible by
healing or exorcism.
As Sudhir Kakar expertly demonstrates, the language of
possession and exorcism may be regarded as a "idiom" for what
contemporary psychiatrists could term the diagnosis and treatment of mental
disease, utilizing traditional Indian cultural categories.
Sudhir Kakar, Shamans, Mystics, and Doctors, 1991, has
further information.