Dreams are involuntary images, emotions or ideas that occur during sleep. There is a great deal of speculation about what dreams are and why we have them.
One theory is that dreams are like the cleaning-up operations of computers when they are off-line. Removing “junk” from the mind during sleep.
However, the opposite view that dreaming has an information handling, memory-combining function is also common. Dreams are a result of the spontaneous firings of brain cells while the brain is combining memories while sleeping.