Viennese Psychiatrist Sigmund Freud first developed the theory about the role of the unconscious on the individual.
Freud believed the dream worked on two levels. A straightforward level showed events in dreams as remembered. However in the latent level objects and actions in the dreams symbolize sexual and aggressive feelings and ideas that are repressed.
So in dreams it protects the sleeper from the effects of a realization of these wishes. The dream taps into the desire for wish fulfilment when the controlling ego is relaxed during sleep.
Freud wrote "All dreams are in a sense dreams of convenience, they help to prolong sleep instead of waking up. Dreams are the guardians of sleep and not its disturbers.
Carl Jung
Myths-Dreams-Symbols Uses the Jungian Perspective
Jung was a student and protege of Sigmund Freud
Carl Jung believed a dreams content uses symbolic language. He proposed that a dream expresses collective racial unconscious memories and instincts shared by all people.
These are basic ideas that are themselves symbols. These include the hero, monster, mother, father, mandala, sacrifice and the mask.
Dreams also indicate the way to self actualization. Jungian therapy in fact deals extensively with dreams and fantasies.