Adi Sankara, living in the 8th century CE, posited three things:
1. God alone is real.
2. The Universe is unreal.
3. The Universe is God.
What does this seeming paradox mean?
Simple. The manifest universe (what you see around you, world, stars, people, roads, the thoughts you think and the emotions they engender, even the body you identify with) has no independent reality apart from unmanifest God which as consciousness pervades all and animates everything, from the atom to the solar system.
The universe is real when seen as a part or reflection of God, but unreal if taken to exist on its own. Like the shadow, which cannot exist without the figure it outlines, or the reflection of the sun in water, which cannot be without the heavenly orb.
Adhere to this consciousness, the witness that experiences everything in creation, the one that is beyond personality, likes or dislikes, the unqualified Awareness which is, and play the game of life knowing that one day the dream, and the dream figure that you represent, and the dreamed universe in which "you" seem to act will subside back into that consciousness, individuality merging into totality.
It is this consciousness - present everywhere you go, at all times, and as such truly deserving the designation of divinity - which is your life-line to the divine, the grand Awareness from which all individual consciousness derives, the Absolute, the All, God, call it what you will. Call it I. You are I.
Once you see the Oneness that underlies and pervades everything, we can play the game of life without attachment or care, truly free. But you were never bound to begin with. Freedom and bliss is your very nature.
So you see, that the Universe can be both real and unreal depending on how you view things is not the paradox it seems, but rather is as natural as can be.