As far as folklore relating to the Far East and Japanese culture, ghosts are often referred to as Yūrei. According to traditional Japanese beliefs, all humans have a spirit or soul called reikon. When a person dies, the reikon leaves the body and enters a form of purgatory, where it waits for the proper funeral and post-funeral rites to be performed, so that it may join its ancestors. If this is done correctly, the reikon is believed to be a protector of the living family and to return yearly in August during the Obon Festival to receive thanks.
However, if the person dies in a sudden or violent manner such as murder or suicide, if the proper rites have not been performed, or if they are influenced by powerful emotions such as a desire for revenge, love, jealousy, hatred or sorrow, the reikon is thought to transform into a yūrei, which can then bridge the gap back to the physical world. The yūrei then exists on Earth until it can be laid to rest, either by performing the missing rituals, or resolving the emotional conflict that still ties it to the physical plane. If the rituals are not completed or the conflict left unresolved, the yūrei will persist in its haunting.
Today, the appearance of yūrei is somewhat uniform, instantly signalling the ghostly nature of the figure, and assuring that it is culturally authentic. The most common features include white clothing and Hitodama: a pair of floating flames or will o' the wisps in eerie colors such as blue, green, or purple. These ghostly flames are separate parts of the ghost rather than independent spirits.
While all Japanese ghosts are called yūrei, within that category there are several specific types of phantom, classified mainly by the manner they died or their reason for returning to Earth.
Onryō- Vengeful ghosts who come back from purgatory for a wrong done to them during their lifetime.
Ubume- A mother ghost who died in childbirth, or died leaving young children behind. This yūrei returns to care for her children, often bringing them sweets.
Goryō- Vengeful ghosts of the aristocratic class, especially those who were martyred.
Funayūrei- The ghosts of those who died at sea. These ghosts are sometimes depicted as scaly fish-like humanoids and some may even have a form similar to that of a mermaid or merman.
Zashiki-warashi- The ghosts of children, often mischievous rather than dangerous.
Samurai Ghosts- Veterans of the Genpei War who fell in battle.
Seductress Ghosts- The ghost of a woman or man who initiates a post-death love affair with a living human.
Yūrei do not wander at random, but generally stay near a specific location, such as where they were killed or where their body lies, or follow a specific person, such as their murderer, or a beloved. They usually appear between 2 and 3 a.m, the witching hour for Japan, when the veils between the world of the dead and the world of the living are at their thinnest. Yūrei will continue to haunt that particular person or place until their purpose is fulfilled, and they can move on to the afterlife. However, some particularly strong yūrei, specifically onryō who are consumed by vengeance, continue to haunt long after their killers have been brought to justice.
As for the story of Okiku, there are many versions of the tale. The most common one being thus:
Once there was a beautiful servant named Okiku. She worked for the samurai Aoyama Tessan. Okiku often refused his amorous advances, so he tricked her into believing that she had carelessly lost one of the family's ten precious delft plates. Such a crime would normally result in her death. In a frenzy, she counted and recounted the nine plates many times. However, she could not find the tenth and went to Aoyama in guilty tears. The samurai offered to overlook the matter if she finally became his lover, but again she refused. Enraged, Aoyama threw her down a well to her death.
It is said that Okiku became a vengeful spirit who tormented her murderer by counting to nine and then making a terrible shriek to represent the missing tenth plate – or perhaps she had tormented herself and was still trying to find the tenth plate but cried out in agony when she never could. In some versions of the story, this torment continued until an exorcist or neighbor shouted "ten" in a loud voice at the end of her count. Her ghost, finally relieved that someone had found the plate for her, haunted the samurai no more.
((A beautiful story, but the Okiku I know is very different from this depiction))