Maya in Indian religions, has multiple meanings, usually quoted as "illusion", centered on the fact that we do not experience the environment itself but rather a projection of it, created by us. Maya is the principal deity that manifests, perpetuates and governs the illusion and dream of duality in the phenomenal Universe. For some mystics, this manifestation is real. Each person, each physical object, from the perspective of eternity, is like a brief, disturbed drop of water from an unbounded ocean. The goal of enlightenment is to understand this more precisely, to experience this: to see intuitively that the distinction between the self and the Universe is a false dichotomy. The distinction between consciousness and physical matter, between mind and body (refer bodymind), is the result of an unenlightened perspective.
The word origin of maya is derived from the Sanskrit roots ma ("not") and ya , generally translated as an indicative article meaning "that" [ citation needed ] . The mystic teachings in Vedanta are centered on a fundamental truth of the universe that cannot be reduced to a concept or word for the ordinary mind to manipulate due to the impossibility to create a complete, perfect and accurate semantic web. Rather, the human experience and mind are themselves a tiny fragment of this truth. In this tradition, no mind-object can be identified as absolute truth, such that one may say, "That's it." So, to keep the mind from attaching to incomplete fragments of reality, a speaker could use this term to indicate that truth is "Not that."
In Hinduism, Maya is to be seen through, like an epiphany, in order to achieve moksha (liberation of the soul from the cycle of samsara). Ahamkar (ego-consciousness) and karma are seen as part of the binding forces of Maya. Maya may be understood as the phenomenal Universe of perceived duality, a lesser reality-lens superimposed on the unity of Brahman. It is said to be created by the divine by the application of the Lila (creative energy/material cycle, manifested as a veilthe basis of dualism). The sanskaras of perceived duality perpetuate samsara.
In Advaita Vedanta philosophy, Maya is the limited, purely physical and mental reality in which our everyday consciousness has become entangled. Maya is held to be an illusion, a veiling of the true, unitary Self the Cosmic Spirit also known as Brahman. The concept of Maya was introduced by the great ninth-century Hindu philosopher Adi Shankara.  He refuses, however, to explain the relationship between Brahman and Maya. 
Many philosophies and religions seek to "pierce the veil" of Maya in order to glimpse the transcendent truth from which the illusion of a physical reality springs, drawing from the idea that first came to life in the Hindu stream of Vedanta.
Maya is a fact in that it is the appearance of phenomena. Since Brahman is the only truth, Maya is true but not the truth, the difference being that the truth is the truth forever while what is true is only true for now. Since Maya causes the material world to be seen, it is true in itself but is untrue in comparison to the Brahman. On the other hand, Maya is not false. It is true in itself but untrue in comparison with the absolute truth. In this sense, reality includes Maya and the Brahman. The goal of spiritual enlightenment ought to be to see Brahman and Maya and distinguish between them. Hence, Maya is described as indescribable. Maya has two principal functions: one is to veil Brahman and obscure and conceal it from our consciousness; the other is to present and promulgate the material world and the veil of duality instead of Brahman. The veil of Maya may be pierced, and, with diligence and grace, may be permanently rent. Consider an illusion of a rope being mistaken for a snake in the darkness. Just as this illusion gets destroyed when true knowledge of the rope is perceived, similarly, Maya gets destroyed for a person when they perceive Brahman with transcendental knowledge. A metaphor is also given when the reflection of Brahman falls on Maya, Brahman appears as God (the Supreme Lord). Pragmatically, where the duality of the world is regarded as true, Maya becomes the divine magical power of the Supreme Lord. Maya is the veritable fabric of duality, and she performs this role at the behest of the Supreme Lord. God is not bound by Maya, just as magicians do not believe the illusions of their own magic.
Maya may also be visualized as a guise or aspect of the Divine Mother (Devi), or Devi Mahamaya, concept of Hinduism.
In Hinduism, Maya is also seen as a form of Laksmi, a Divine Goddess. Her most famous explication is seen in the Devi Mahatmyam, where she is known as Mahamaya. Because of its association with the goddess, Maya is now a common girl's name in India and amongst the Indian diaspora around the world. 
Essentially, Mahamaya (great Maya) both blinds us in delusion (moha) and has the power to free us from it. Maya, superimposed on Brahman, the one divine ground and essence of monist Hinduism, is envisioned as one with Laxmi, Durga, etc. A great modern (19th century) Hindu sage who often spoke of Maya as being the same as the Shakti principle of Hinduism was Shri Ramakrishna.
In the Hindu scripture Devi Mahatmyam , Mahamaya (Great Maya) is said to cover Vishnu's eyes in Yoganidra (divine sleep) during cycles of existence when all is resolved into one. By exhorting Mahamaya to release Her illusory hold on Vishnu, Brahma is able to bring Vishnu to aid him in killing two demons, Madhu and Kaitabh, who have manifested from Vishnu's sleeping form. Sri Ramakrishna Paramahamsa often spoke of Mother Maya and combined deep Hindu allegory with the idea that Maya is a lesser reality that must be overcome so that one is able to realize his or her true Self.
Maya, in Her form as Durga, was called upon when the gods and goddesses were helpless against the attacks of the demon Mahisasura. The combined material energy of all the gods, including Brahma, Vishnu and Shiva, created Her. She is thus said to possess the combined material power of all the gods and goddesses. The gods gave her ornaments, weapons, and her bearer, the lion. She was unassailable. She fought a fierce battle against the demon Mahisasura and his huge army. She defeated the demon's army, killed the demon, and hence restored peace and order to the world. Thus She is, even now, the protector of the Universe, which is lying in her lap.
Devi Mahamaya is also a Kuldevata of the Gowd Saraswat Brahmins and Daivajnas of the western coast of India.
In Theravada Buddhism, the current expression of Buddhism most closely associated with early Buddhist practice, Maya is the name of the mother of the Buddha. This name may have some symbolic significance given the place of Maya in Indian thought, but it does not seem to have led this tradition to give to the concept of Maya much of a philosophical role. The Pali language of Theravada speaks of distortions (vipallasa) rather than illusion (maya).
Subsequently, in Mahayana Buddhism, illusion seems to play a somewhat larger role. Here, the magician's illusion exemplifies how people misunderstand themselves and their reality, when we could be free from this confusion. Under the influence of ignorance, we believe objects and persons to be independently real, existing apart from causes and conditions. We fail to perceive them as being empty of a real essence, whereas in fact they exist much like Maya, the magical appearance created by the magician. The magician's illusion may exist and function in the world on the basis of some props, gestures, and incantations, yet the show is also illusory. The viewers participate in creating the illusion by misperceiving and drawing false conclusions. Conversely, when appearances arise and are seen as illusory, that is considered more accurate.
Altogether, there are "eight examples of illusion (the Tibetan sgyu ma translates Maya and also other Sanskrit words for illusion): magic, a dream, a bubble, a rainbow, lightning, the moon reflected in water, a mirage, and a city of celestial musicians." Understanding that what we experience is less substantial than we believe is intended to serve the purpose of liberation from ignorance, fear, and clinging and the attainment of enlightenment as a Buddha completely dedicated to the welfare of all beings.
Depending on the stage of the practitioner, the magical illusion is experienced differently. In the ordinary state, we get attached to our own mental phenomena, believing they are real, like the audience at a magic show gets attached to the illusion of a beautiful lady. At the next level, called actual relative truth, the beautiful lady appears, but the magician does not get attached. Lastly, at the ultimate level, the Buddha is not affected one way or the other by the illusion. Beyond conceptuality, the Buddha is neither attached nor non-attached This is the middle way of Buddhism, which explicitly refutes the extremes of both eternalism and nihilism.
Nagarjuna, a Mahayana of the Madhyamaka "Middle Way" school, discusses nirmita , or illusion closely related to Maya. In this example, the illusion is a self-awareness that is, like the magical illusion, mistaken. For Nagarjuna, the self is not the organizing command center of experience, as we might think. Actually, it is just one element combined with other factors and strung together in a sequence of causally connected moments in time. As such, the self is not substantially real, but neither can it be shown to be unreal. The continuum of moments, which we mistakenly understand to be a solid, unchanging self, still performs actions and undergoes their results. "As a magician creates a magical illusion by the force of magic, and the illusion produces another illusion, in the same way the agent is a magical illusion and the action done is the illusion created by another illusion."What we experience may be an illusion, but we are living inside the illusion and bear the fruits of our actions there. We undergo the experiences of the illusion. What we do affects what we experience, so it matters.In this example, Nagarjuna uses the magician's illusion to show that the self is not as real as it thinks, yet, to the extent it is inside the illusion, real enough to warrant respecting the ways of the world.
For the Mahayana Buddhist, the self is Maya like a magic show and so are objects in the world. Vasubandhu's Trisvabhavanirdesa, a Mahayana Yogacara "Mind Only" text, discusses the example of the magician who makes a piece of wood appear as an elephant The audience is looking at a piece of wood but, under the spell of magic, perceives an elephant instead. Instead of believing in the reality of the illusory elephant, we are invited to recognize that multiple factors are involved in creating that perception, including our involvement in dualistic subjectivity, causes and conditions, and the ultimate beyond duality. Recognizing how these factors combine to create what we perceive ordinarily, ultimate reality appears. Perceiving that the elephant is illusory is akin to seeing through the magical illusion, which reveals the dharmadhatu, or ground of being.
Buddhist Tantra, a further development of the Mahayana, also makes use of the magician's illusion example in yet another way. In the completion stage of Buddhist Tantra, the practitioner takes on the form of a deity in an illusory body (mayadeha), which is like the magician's illusion. It is made of wind, or prana, and is called illusory because it appears only to other yogis who have also attained the illusory body. The illusory body has the markings and signs of a buddha. There is an impure and a pure illusory body, depending on the stage of the yogi's practice.
The concept that the world is an illusion is controversial in Buddhism. In the Dzogchen tradition the perceived reality is considered literally unreal. As a prominent contemporary teacher puts it: "In a real sense, all the visions that we see in our lifetime are like a big dream In this context, the term visions denotes not only visual perceptions, but appearances perceived through all senses, including sounds, smells, tastes and tactile sensations.