Dreams that happen well we sleep? Those are our imagination creating things for us to see, some for a reason usually created by the subconscious. Others just a culmination of events blended together.
The dreams we have well awake and aware tend to be our goals that aren't subliminal "I want 'x' to happen but first I need 'y' then 'a' then 'z1' to achieve that"