Then what is that my friend was talking? Why he was calling this world as Maya (माया or māyā) or illusion? What is the philosophical meaning of his saying this world an illusion? Was he wrong in his saying that this world is unreal? In philosophy, the meaning of Maya is "that is not" but which appears to be real. In Hinduism, this world in which we live is called unreal not because of that it does not exist, but because it is unstable, impermanent, unreliable, ever changing and illusory. It is unreal because it is transient & changing every second. Just check the things around you, these are changing every second. So this changing world, which is not permanent is called Maya or illusion & not real.
In Hindu philosophy, Universal Spirit (Brahman) or God is the only truth which never changes & always remains the same but this world is changing every moment so that is the reason it is called untrue. Since Maya causes the material world to be seen, it cannot be untrue also. Hence, Maya is described as indescribable.
Purpose of Maya: In reality the purpose of Maya is to produce the duality in this world. Maya performs this role at the behest of the Supreme Lord only. God is not bound by Maya, just as magicians are not illusioned and deluded by their own magic. She has two principle functions - one is to veil the Universal Spirit (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 the Universal Spirit (Brahman).
Lord Krishna in Bhagwat Gita details about the 'Maya' in it's various chapters.
"mama yonir mahad brahma
tasmin garbham dadhamy aham
tato bhavati bharata" (Bhagwat Gita: Chapter Fourteen verse 3)
"Sri Krishna said: O Arjuna, My womb is the great Nature (Prakriti or MAYA) which is the source of birth of all living entities, and it is in that I place the germ (embryo of life). Thus it makes possible the births of all living beings."
murtayah sambhavanti yah
tasam brahma mahad yonir
aham bija-pradah pita" (Bhagwat Gita: Chapter Fourteen verse 4)
"Sri Krishna said: O Arjuna, It should be understood that all species of life, are made possible by birth in this material nature (Prakriti or MAYA), and that I am the seed-giving father."
"prakrityaiva cha karmani
yah pasyati tathatmanam
akartaram sa pasyati" (Bhagwat Gita: Chapter Thirteen verse 30)
"Sri Krishna said: O Arjuna, One who can see that all activities are performed by the nature (Maya) alone and sees that the self does nothing, actually sees." (The Self is the silent witness).
Ramakrishna on Maya
Ramakrishna acknowledged the power of Maya in life. He was all love and reverence for maya, perceiving in it a mysterious and majestic expression of Divinity. To him Maya was God.
In the guru Ramakrishna's experience, Maya was divine. Ramakrishna "did not, like a Vedantic scholar, repudiate the world as maya, but gave it a spiritual status, seeing in it the manifestation of Chit and Ananda." Ramakrishna had a "vision of the divine Maya, the inscrutable Power of God, by which the universe is created and sustained."
According to Ramakrishna, Maya projects and withdraws the world.
Further, "Maya . . . is the Mother of the Universe, identical with the Brahman of Vedanta and with the Atman of Yoga.
Ramakrishna discovered that maya operates in the relative world in two ways and he termed these "avidyamaya" and "vidyamaya.' Avidyamaya sustains lower planes, but vidyamaya is enlightening, including qualities like kindness. Vidyamaya elevates a man to a better consciousness. With the help of vidyamaya he then gets free of maya, if only for a while. The two aspects of maya are two forces of creation.
Ramakrishna said further: "When I think of the Supreme Being as inactive - neither creating nor preserving nor destroying - I call Him Brahman or Purusha . . . When I think of Him as active - creating, preserving, and destroying - I call Him Sakti or Maya or Prakriti, the Personal God.
To Ramakrishna maya itself was God - everything was God - [maya] was one of the faces of [the Godhead].
As per Ramakrishna: Maya can not be distinguished from the supreme [Godhead]
As per Ramakrishna: The mighty weaver (Maya) is none other than the Divine Mother.
As per Ramakrishna: Maya releases from bondage.
"I tell you the truth: there is nothing wrong in your being in the world." - Ramakrishna
Vivekananda on Maya
This universe is maya - Vivekananda
Maya is used incorrectly to denote illusion or delusion. - Vivekananda