I have read bhagavad gita where krishna mentions maya to be a illusion and everything in this is world is made of maya. What I don't understand is if everything is made up of maya then why is krishna telling it, isn't that too maya ? and what about the moksha, isn't that also a delusion? Why should I still try to attain moksha if it is unreal?
Everything that we see and don't see, the whole of our material existence is made up of two primary components, prakriti and purusha:
saṃyuktametatkṣaramakṣaraṃ ca vyaktāvyaktaṃ bharate viśvamīśaḥ [Sve. Up. - 1.8]
-By the combination of perishable (prakruti) and imperishable (purusha), the lord fills the whole world with the manifest and unmanifest.
yāvat sañjāyate kiñcit sattvaṁ sthāvara-jaṅgamam
kṣetra-kṣetrajña-saṁyogāt tad viddhi bharatarṣabha [BG - 13.27]
O chief of the Bhāratas, know that whatever you see in existence, both the moving and the nonmoving, is only a combination of the ﬁeld of activities (prakriti) and the knower of the ﬁeld (purusha).
Of these two, prakruti is the inert and insentient part and purusha is the active sentient part. So all lifeless matter that we see starting from sand grains to matter in our bodies is the product of prakruti. But the other part known as Purusha is what gives life to matter. So we living beings are a marveolous fusion of prakruti and purusha. And it is this prakruti which is also known as maya, avidya (ignorance), etc.:
māyāṃ tu prakṛtiṃ vidyānmāyinaṃ ca maheśvaram [Sve. Up. - 4.10]
- Know that prakriti is maya itself and God is the lord of it.
Now the thing regarding maya is that, due to its influence the soul which is actually free finds itself in bondage. Mind is the product of prakriti, hence it naturally stays under the influence of the threefold material natures known as satva, rajas and tamas. These threefold nature arise due to prakriti or maya:
bikārāṃśca guṇāṃścaiva biddhi prakṛtisambhavān [BG - 13.20]
-Know that material nature and transformations arise from prakriti.
And because the mind of a person naturally stays under its influence, he does many kinds of material activities and gets entangled and bound in the samsara. Due to his actions under the influence of God's maya he keeps on wandering through different bodies:
īśvaraḥ sarva-bhūtānāṁ hṛd-deśe ’rjuna tiṣṭhati
bhrāmayan sarva-bhūtāni yantrārūḍhāni māyayā [BG - 18.61]
O Arjuna, God resides in the heart of every being and through His maya He is making them all wander as if they are seated on a machine.
But, beyond this material existence there exists spiritual existence entering where one doesn't have to return to this material world of pain and suffering again:
yaṁ prāpya na nivartante tad dhāma paramaṁ mama [BG - 8.21]
-That is my supreme abode, attaining which, one doesn't have to come back.
So because jiva is primarily spiritual in nature but has accepted this material mode of existence due to ignorance (maya), Shri Kirshna instructs to get rid of it and try for liberation.
Why does maya exist?
It exists because God exists. Just like heat and light are inherent properties of fire, maya is an inherent energy potential of God. Hence, it will always exist. So no one can destroy it completely, but can get rid of it for himself. So Shri Krishna says:
daivī hy eṣā guṇa-mayī mama māyā duratyayā
mām eva ye prapadyante māyām etāṁ taranti te [BG - 7.14]
This divine energy of Mine, consisting of the three modes of material nature, is difﬁcult to overcome. But those who approach (surrender) to Me alone, cross beyond it easily .
So the answers to your questions are as below:
- The whole world is not an illusion. Illusion means, unreal. But the world is not unreal. Maya is just one aspect of the existence, not whole of the existence.
- Krishna is telling about it, because ignorance is the foremost form of maya. By listening and understanding about the truth one gains knowledge which helps him destroy ignorance and get rid of maya.
- So moskha is not a delusion, it is the process or activity of getting rid of this material world and the endless circle of births and deaths. So moksha in one sense is the jiva's returning to its original home, back to the Godhead.
- Moksha is not unreal, hence you should try to attain it. Even just by acquiring the right knowledge and realizing it you will feel more happiness and peace here on this earth, what to speak of the bliss of liberation!
Thus I have briefly answered your questions. But the subject matter is such that it can occupy a whole book. But to summarize all, I end the answer with the following verse:
kṣaraṃ pradhānamamṛtākṣaraṃ haraḥ kṣarātmānāvīśate deva ekaḥ tasyābhidhyānādyojanāttattvabhāvādbhūyaścānte viśvamāyānivṛttiḥ [Sve. Up. - 1.10]
Primordial matter (pradhana / prakriti) is perishable. Immortal and imperishable is the soul. Both over the perishable and the soul rules one God. By meditating upon Him, by uniting with Him, and by becoming one with Him at the end one gets rid of all kinds of maya.
Under the influence of the three gunas, the soul is (1) misled by matter, and (2) subsequently entangled and entrapped. This tendency is termed maya (illusion).
Under maya's influence, the atman, (the soul) mistakenly identifies with the body. He accepts such thoughts as "I am white and I am a man," or "This is my house, my country, and my religion." Thus the illusioned soul identifies with the temporary body and everything connected to it, such as race, gender, family, nation, bank balance, and sectarian religion. Under this sense of false-ego (false-identity) the soul aspires to control and enjoy matter. However, in so doing he continuously serves lust, greed, and anger. In frustration he often redoubles his efforts and, compounding mistake upon mistake, only falls deeper into illusion.
In ignorance (tamas), he is fully convinced that right is wrong and wrong is right. In passion he is unsure, hesitant, sometimes enjoying and at others times repenting. Only in goodness does the soul begin to develop wisdom – to see things in the real light. Thus enlightenment means moving away from tamas towards sattva. By so doing, the soul gradually escapes the clutches of maya and moves towards liberation.
"Māyā" means "reality"
It can also mean "illusion", depending on your viewpoint. Literally, "mā" "yā" — that, which is not. Lord Krišna is the only puruša and īšvara or total enjoyer and controller above all states of existence (BG 4.6, 5.29). For all other, there are basically two states of reality — yoga māyā (BG 7.25) and mahā māyā (BG 7.26-27).
or parā prakriti facilitates the pastimes of the living entities in the spiritual world in connection with their (our) source (BG 9.13).
or aparā prakriti covers the full knowledge and constraints to material dualities of sense perception. This isolates those who do not cooperate with their source (BG 9.12).
Most of the Vedic instructions are about switching your perception of reality from material to transcendental, e.g. Bhagavad-gītā 7.28. The transcendental reality is supposed to be more enjoyable. However, it can still be called illusion, because someone like Nanda babā might think he is the father of Krishna, although actually Krishna is the original source and Nanda is actually His energy. Nonetheless, that relationship is extremely enjoyable for both of them.
can also be created by mystic beings like rākšasas, and people can also bewilder each other. Every woman is supposed to somewhat possess mystic abilities. These illusions can also be called "māyā", but they are not so general and permanent.
You are confused about maya (illusion) and moksha (liberation from material world). Krishna says this material world is illusion becasue if I ask you a simple question you won't be able to answer it. If I ask you to point towards you then you can point towards your face, your chest, your head and etc etc etc but none of it is you. Those are all basically the organs of your material body. So where is that real you located? Most of the world is deluded about it and instead most focus is on gross material body which is not the real self. But the soul is very subtle. It is covered by gross material body and astral body and both are the covering of soul in material worlds. This is illusion. This is the illusion which has been covering the soul in material world. And Krishna tells us how to remove that illusion. But moksha is real thing. It is not illusion. It is removal of illusion. It is important and you should strive for it because if not then illusion will keep you in material world in different bodies. This material world is actually a prison house and we are not supposed to be here eternally. Our real home is in Golok Vrindavan, the abode of God himself.
Everything in this world, and the world is itself maya. This simply suggests that everything tangible to the senses is unreal. And for that matter, so was Krishna. It is Krishna’s body that is maya, it hence perished. But not the cosmic spirit, it is eternal and is intangible to the senses. Moksha is hence liberation from this delusion of body-mind complex.