The Sanskrit word Maya in the religious and spiritual sense can mean illusion, delusion, unreality, trick, earthly ignorance, phantasm, attachment, or worldly illusion. It’s a common concept appearing in Hindu philosophies.
Maya points to the idea that the phenomenal world is nothing but unreal and illusory. It’s the creation-illusion, the illusoriness of the appearance of the Universe as material and distinct from the observer, being in reality spiritual and just the shadow, cast, or radiation of the Absolute Witness i.e. Brahman.
Maya is rather considered the contents of consciousness, as a concept related to Prakriti, that what is constantly changing and thus ultimately unreal. This in opposition to the unchanging Absolute or Brahman.
In Advaita Vedanta, it’s thought that Maya appears because of Avidya (spiritual ignorance of the nature of the True Self) which causes us to wrongly identify Atman-Brahman with the body-mind and with world phenomena. Hence, only a correct understanding of the real Self will make that we’ll see that what we thought that was real was actually the play of Maya — the play of and within consciousness.
Nonetheless, it’s important to note here that Maya in the Advaitic sense doesn’t mean that the material world is not real and doesn’t exist. It’s rather that with its “power and magic” Maya veils (hides) the higher spiritual truth of non-duality and oneness by creating bondage i.e. attachment to the material, phenomenal world.
Maya and Brahman together form the Universe. Maya could be said to be the actual manifestation of the Universe, while Brahman is the causeless cause behind it.