Found this interesting post in a thread about what happens when you die, according to hinduism.
The post is taken from here!
Death is a great mystery. What happens to us after we die? What happens if we suffer a violent death or commit suicide? Do ghosts exist?
There is an interesting article on afterlife in a magazine run by Vedanta Center of Seattle:Swami Bhaskarananda of the Vedanta Society of Western Washington inSeattle ...said, in a lecture on the afterlife, that while he had never seenone (ghost), he knew ghosts must exist according to the principles of Vedanta.All of existence resembles the electromagnetic spectrum. Just as there areworlds of phenomena at both ends of that spectrum that are beyond our senses'ability to perceive, there are innumerable planes of existence beyond ourperception as well, and for much the same reason: they vibrate at rates ourminds cannot "tune into". When a person dies, he or she moves to one of thesevibrational planes of lokas.
A schematic of these vibrational planes and lokas are given below:
Bhuh is the Earth plane.
All the planes higher than the Earth plane are also called swarga (translated as heaven).
All the planes lower than the Earth plane are called naraka (translated as hell).
Usually after ordinary death we will be born at any of these planes depending on our karma.Those who reach Brahmaloka does not have to come back to Earth plane.
So what happens if we commit suicide or suffer a violent death? When a person dies suddenly, the finality of the situation doesn't hit home, and the person tries to move back into the plane of the living. When that happens, well - such is the genesis of your average ghost.
A person who stays in the Earth plane without a physical body is a ghost.