What are the reasons for attaining for preta janma [various are there] and how to get relieved from that? viz what are the prayaschittas to be done for that?
Attaining the preda Janma-- People who try to take the possession over others property (wealth, money, land, houses, jewellery) exercising unacceptable acts such as robbing, surcharging with interests etc., would be punished with this punishment by god of death Yamraj’s retainers and cast them into the Naraka (hell) known as Tamisram. To get relieved-- Narayana started explain to Garuda how to get relieved of this preda janma .When a person is alive he has to do Viruksha sarkam---[விரு÷ஷாற் சர்க்கம்] by his own hands. No karma can prevent this. On the eleventh day of death if it was done he will go to his ancestors place and will attain mukthi.This karma to be done by son, wife, grand son and daughter. Source--Garuda puranam--PUNISHMENT 1: Tamisram (Heavy Flogging)
As per Bhagavad Gita, when the mode of Tamas (ignorance) is predominant, one tends towards bhuta-preta, & hence would eventually be born or exist as bhuta-preta:
यजन्ते सात्त्विका देवान्यक्षरक्षांसि राजसाः। प्रेतान्भूतगणांश्चान्ये यजन्ते तामसा जनाः
BG 17.4 - Those with sattva, worship the gods; those having rajas, worship the demons and ogres; Other people possessed of tamas, worship ghosts and the spirits
यान्ति देवव्रता देवान् पितृ़न्यान्ति पितृव्रताः। भूतानि यान्ति भूतेज्या यान्ति मद्याजिनोऽपि माम्
BG 9.25 - Those go to divine, who worship divine; Those go to ancestors (normal pitru-s or demons), who worship ancestor; Those go to ghosts, who worship ghosts; Those come to "Me", who worship "Me"
Worship doesn't necessarily mean -- hand folded, eyes closed, head down. One may worship by remembering or being in that aura. For example, if one keeps thinking about past (bhuta kAla), then one is said to be worshiping of bhuta.
Following are the ways towards bhuta-preta:
BG 18.28 - The agent who is unsteady, naive, unbending, deceitful, wicked, lazy, morose and procrastinating is said to be possessed of tamas (ignorance).
Once the mode of sattva becomes predominant, the consciousness lifts up from the lower planes and move towards higher planes [towards self realisation].
BG 14.18 - Those with sattva(goodness) go higher [regions]; those with rajas(passion) remain in the middle [regions]; those with tamas(ignorance), who conform to the lowest actions, go down [regions].
There is no timeline for how long one remains in any loka(region). Until one is attached to certain mode among 3, one remains in that or intermediate region.
Gita chapter 14 and several verses in chapter 18 are dedicated to explaining sattva [rajas, tamas] qualities.