Yoga is a physical mental and spiritual discipline originating in ancient India. The goal of yoga or of the person practicing yoga is the attainment of a state of perfect spiritual insight and tranquility while meditating on Super soul. The word is associated with meditative practices in Hinduism Jainism and Buddhism.
With in Hindu philosophy the word yoga is used to refer to one of the six orthodox astika schools of Hindu philosophy. Yoga in this sense is based on the Yoga Sutras of Patanjali and is also known as Raja Yoga to distinguish it from later schools. Patanjali's system is discussed and elaborated upon in many classical Hindu texts and has also been influential in Buddhism in Jainism. The Bhagavad Gita introduces distinctions such as Jnana Yoga Yoga based on knowledge vs. Karma Yoga yoga based on action.
Other systems of philosophy introduced in Hinduism during the medieval period are bhakti yoga and hatha yoga.
The goals of yoga are varied and range from improving health to achieving moksha. Within the Hindu monistic schools of Advaita Vedanta Shaivism and Jainism the goal of yoga takes the form of moksha which is liberation from all worldly suffering and the cycle of birth and death samsara at which point there is a realization of identity with the Supreme Brahman. In the Mahabharata the goal of Yoga is variously described as entering the world of Brahma as Brahman or as perceiving the Brahman or Atman that pervades all things. For the bhakti schools of Vaishnavism bhakti or service to Svayam Bhagavan itself may be the ultimate goal of the yoga process where the goal is to enjoy an eternal relationship with Vishnu.