Good Work -> Good Fruit
Bad Karma -> Bad Fruit
According to Shrimad Bhagwat Geeta
here Lord Krishna said that
For good deeds people go to heaven and have good fruits, they go to hell for their bad ones and after facing both good in heaven and bad in hell they again come to earth again by taking rebirth.
Then Lord said
To be free Oh Arjuna you have to leave the desire of fruits. Do Karma without willingness of fruit and worship me in parallel. Only surrender unto me can lead to the Moksha(Mukti or Freeing from rebirth).
Those who worship ghosts, reach ghosts, those who worship deity gets that deity but worshiping me only reach me. So you just worship me and perform your duties.
By doing so your Karma will be converted to "aaKarma". you will not have fruits, but those "Karma"s will be considered as I(GOD) have done.
So with no binding of fruits, such of you will get free from rebirth.
Lord Krishna said in this verse and here
But one who attains to My abode, O son of Kunti, never takes birth again.
What is Moksha?
a state where a soul gets returned to "ParamDhama or Akshar Dham - a supreme abode" A permanent home of souls(body is considered as temporary home), where all souls resides. And again come to earth when their role is again in next World-Drama.
This state is never permanent. Because Lord Said:
Those who died, his next birth is absolutely happen, and the born one will absolutely die.
who is dead , birth is certain
So for maybe some time soul will get Moksha,which is different than death.
After death soul may go to heavan or hell but after moksha soul go to "Paramdhama".
Except Shiva Parmatma, every body takes birth. All the souls. Even Lord Vishnu also. Only Lord Shiva never takes birth because he is considered as "Ajanma" birthless (who has never born).
Moksha is a state where soul is inactive and is considered as Mukti (Free from Karmas).
But there is also Moksha in real life known as "Jeevan Mukti" (Living Moksha)
Lord Krishna said,
Be neutral in doing your Karma, rise above hates and loves, have neutrality for Good or Bad, Happiness and sorrow and just perform your duty with clean heart. Consider Elephant, Gentleman, Demon and dog as same souls(Neutral for all). And you will free from any effects of your performed activity.
Such devotee is considered highest
In another verse in Guruleelamruta
Moksha is considered as Krupa "Blessings" of Guru Duttatreya(GOD who is considered as Combinations of all three Brahma, Vishnu, Mahesh)
Dhyanmulam Gurur murty, Pooja mulam Guru padam,
Mantravakyam Gurur Vakyam, Mokshamulam Guruh Kripa ||
means the last one Moksha mulam Guruh Kripa, means Guru's Kripa is root towards Moksha. Only God's blessing can make you reach Moksha, but is temporary. Moska is not permanent.
Example
is of 24 Tirthankara's in Jainism who are said to take birth again after attaining the birth, and All these tirthankara's were Hindu Kshatriyas!!
And Lord Vishnu himself takes birth millennium after millennium.
Is Moksha permanent?
Mokṣa is not permanent. Souls attained Moksha are never again subject to the qualities of matter or to Karma. But if they or GOD choose, for some good karmas for the world, they may incarnate on earth. But after the kalpa, everything is reset. So after kalpa new Moksha attainment is required.