There are lots of theories regarding dreams. One of them is the theory that dreaming is a way of alleviating stress/tensions caused by our unconscious desires which are not acceptable for our conscious mind. While other dream theorists claim that dreams are manifestations of our higher consciousness, or a sort of some spiritual phenomenon.
If you wanna learn more about dreams and dream interpretations, try to google them using these key words:
Sigmund Freud, The Interpretation of Dreams
Carl Jung, Man And His Symbols
Edgar Cayce, Dream Interpretations
Magkakaibang theories nila, pero may similarities. Anyway, since theories lang naman ang mga yun. Pinakamahalaga pa din ang magdasal bago matulog para kung sakali mang hindi ka na magising, at least nakahingi ka na ng tawad sa Kanya.