In many cases, a dream tries to reflect reality. However, for whatever reason, there are usually elements in the dream that are out of place. The conscious mind can notice these out of place elements, but generally only if there is enough awareness to catch the tuggings of the conscious mind. Usually we are so buried in the dream that we don't notice those oddities, accepting them as they are, until after we wake up - if we even remember the dream at all.
If you have enough awareness to hear those tuggings of the conscious mind, your conscious mind can rise up to where you realize that you are in a dream. Thus begins a lucid dream, where you can just watch or start to take control of your dream. Sometimes the conscious mind can rise up too much to where you begin to wake up.
One analogy that has been used about life is that it is a dream. How our perception of life is actually a dream and that if we wake up, we can be enlightened, in the world but not of it, etc. And how does that waking up happen? Awareness. And how can awareness happen? Meditation.
In the waking world, I see that the ego, shadow self, or whatever you want to call it, acts just like that part of the brain that gives us dreams. Then there is the higher consciousness, or super consciousness, that tries to tell us that we are dreaming. How well we hear it depends on our level of awareness.
I recently had an experience that brought me much pain in the past. This time, however, I could see that it was the ego making noise, trying to protect me. Despite noticing this, it still produced stress, as I had no idea what to do about it. I could clear my mind, but not too much later it would come back. It's like not being knocked over by an ocean wave, but not too much later the next wave comes along.
How to describe what happened next is difficult. I guess I could say that I listened closer to what the ego was saying. It was saying something, though, that suggests that I made a conscious decision. It was then when I saw it for what it was, as I had not made that conscious decision at all and was (and still am) trying to figure things out enough to come to a decision.
Now I am at a point of realization that if I make a particular decision, the voice of that ego will come back. I'm not sure what I would do, but am trying to not let that influence my decision. But I do have it in the back of my mind, trying to figure out how to bring peace to that part of me, as no matter what decision I make, it is likely to come back sooner or later.