Samsāra in Hinduism
In Hinduism, it is avidya, or ignorance, of one's true self that leads to ego-consciousness of the body and the phenomenal world. This grounds one in kāma (desire) and the perpetual chain of karma and reincarnation. Through egoism and desire one creates the causes for future becoming. The state of illusion that gives rise to this is known as Maya.
Through ascetic practice one finally attains sanctity and liberation (moksha or mukti).
Broadly speaking, the holy life (brahmacarya) which leads to liberation is a path of self-purification by which the effects of sins are released.
The Hindu Yoga traditions hold various beliefs. Moksha may be achieved by love of Ishwar/God (see bhakti movement, see Mirabai), by psycho-physical meditation (Raja Yoga), by discrimination of what is real and unreal through intense contemplation (Jnana Yoga), and through Karma Yoga, the path of selfless action that subverts the ego and enforces understanding of the unity of all.
The Rig Vedic, Yajur Vedic and Atharva Vedic Upanishads like Aiteraya Upanishad, Taittiriya Upanishad, Swetaswatara Upanishad, Mundaka Upanishad etc. contains the most ancient ideas on Reincarnation of soul. As confirmed by latest research in the field of archeology and Astronomy, Vedas were older than 2600 BC which takes it far earlier than all other religious texts. Hence, based on this, the earliest known texts to have spoken about karma, sansara and Moksha or Mukti, are the Vedas and other Dharmic Texts. (Dharmic Texts stands for the Vedas, Ithihasas and Puranas). The Vedas describe Karma as the result of enjoying the sensory pleasures of this material universe.
Read more about this topic: Saṃsāra