According to one theory dreams are the thoughts of the subconscious mind. Because the subconscious mind thinks using symbols we see dreams encoded in those symbols .
Humans always use metaphors to describe things for example 'Brave like lion' or 'scared like a chicken'. The fact that we symbolize everything can be one reason we see some of those symbols in our dreams .
If the dream is about a very unpleasant fact then the subconscious mind might not want to shock us with the bitter truth and so it uses symbols to encode the dream and make it more bearable for us to receive the message in it .
The visual images a person sees are usually used as symbols. If for example a person spent one week playing a certain video game then some of the elements in this video game might be used as symbols in that person's dreams, See why we dream.
Because some dreams might hold very unpleasant messages the subconscious mind might want to make the dream hard to interpret in order to allow a person to understand the dream over the span of few days instead of getting it right away, See how to interpret dreams.
If a person was too afraid of the future then he might see a ghost in his dream. In such a case the subconscious mind might be trying to vent some of those fears without referring to the actual problem .
In one theory dreams occur because the subconscious mind is sorting the new memories and events by adding them to the long term memory. If the same bad events were repeated while we are asleep then we might not be able to sleep well so symbols might be used instead .
Many of the people we see in our dreams are actually symbols referring to other people. Because sometimes a certain situation that happened with a certain person might be a little sensitive the subconscious mind might not refer to the person directly and might use a symbol instead (someone else) .