Halloween is a festival popular in America where people dress up as ghosts at night of October 31 to drive away the ghosts who visit earth. It is traced to an old Celtic festival that saw this day, at the cusp between autumn and winter, as the day when the land of the dead comes closest to the land of the living. It is closely related to All Souls Day when Christians pray for the souls of the dead who are in purgatory, waiting for the Second Coming of Christ and Judgement Day.
All cultures have days when the dead are worshipped. And this is closely linked to ghosts, as ghosts are seen as the restless dead, those who refuse to go to the land of the dead, and continue to fester in the land of the living, troubling those alive, seeking to gain control of their body and their mind through terror. In Hinduism, there is no exact equivalent of Halloween, but there are many rituals performed that recognises the proximity of ghosts and seeks to keep them away.
Every year, a fortnight known as Pitr Paksha, between the the worship of Ganesha (Ganesha Chaturdashi) and the worship of Durga (Navaratri) is reserved for ancestors (pitrs) of Hindus. This when sarva-pitri-shraadh is done, to appease all the dead, who hang upside down, like bats, in Yama-loka awaiting rebirth. During ceremonies the living promise the dead that they will produce children to ensure their rebirth. However, the offering does not satisfy some pitrs and they turn into pretas, or ghosts.
There are different kinds of ghosts: bhoot, preta, pisacha, vetals. Those who lived incomplete lives do not want to go to the land of the dead and so stay back in the land of the living. Those who lived complete lives, but their funeral rites were not properly performed, stay trapped in the land of the living. Some are cursed for misdeeds never to find peace in death and so in misery haunt the living. These are the ideas about ghosts that one gathers from various folklores and from the Garuda Purana, an elaborate treatise on death rituals.
In the Rig Veda, especially in the Atharva Veda, there are many hymns addressed to gods such as Indra, Agni and Soma, who are invoked to destroy fearful demons who emerge out of darkness. This indicates an awareness of malevolent spirits, and ghosts.
The Bhagavat Puran informs us that Brahma, in a state of laziness, created bhuta-pisachas or ghosts. They were naked and their hair was unbound. Seeing them he shut his eyes (in fear?).
sṛṣṭvā bhūta-piśācāṁś ca
bhagavān ātma-tandriṇā
dig-vāsaso mukta-keśān
vīkṣya cāmīlayad dṛśau
- from Srimad-Bhagavat 3.20.40
Many gods and goddesses are linked to ghosts. They are invoked to drive the ghosts away. The most popular of these is the gaunt Chamunda, who lives in crematoriums, is garlanded with heads and limbs of men, and travels on the back of ghosts (preta). She is closely related to the wild Kotravai of the crematorium found in ancient Tamil lore.
They are also invoked by sorcerers who wished to control the pretas and turn them into powerful slaves. The most famous story of such a practice is that of Vikramaditya and the Vetala. In Odisha, where in medieval times, Tantra was widely practiced, there is a Vetal Deul in the capital city of Bhubaneshwar, associated with ghosts and exorcism.
In Kerala, there are tales of yakshis who seduce young men and gandharvas who seduce young women and either kill them or drive them mad. Those afflicted visit the temple of the goddess Chottanikkara Bhagavathy to be free of the ghosts. In this temple, ghosts are exorcised and driven away to the land of the dead. Similar rituals are performed in the Balaji Hanuman temple at Mehndipur, Rajasthan, where there is also a shrine dedicated to Pret-raj, king of ghosts, a form of Yama. Other deities invoked to get rid of ghosts are Kal Bhairav Kotwal of Varanasi.
The modern practice of hanging slippers on the gateway is to frighten ghosts away. Lemon and chillies and rock salt as used to feed them and keep them away while coal and iron is used to frighten them away, in many folk rituals. Basically ghosts are seen as embodiments of malevolent and negative energies - the jealousy and hatred of others (living or dead) that can make us vulnerable to ailments and bad luck.
Belief in ghosts acknowledges that we are surrounded by many forces, positive and negative, all unseen. These unseen forces were called spirits and ghosts and originally spirituality meant faith in these unseen forces. Over time, spirituality has come to mean faith in god or soul or energy, but it is just a sanitised version of belief in unseen forces, especially the force whose entry creates life and whose exit results in death, a force whose understanding still eludes scientists.
Also read: Why do Hindus light lamps?