Dreams (رؤیا) have different kinds, authentic or not authentic, and the authentic ones are themselves symbolic or realistic.
First note that sleeping according to Quran is very similar to death:
وَهُوَ الَّذِي يَتَوَفَّاكُم بِاللَّيْلِ وَيَعْلَمُ مَا جَرَحْتُم
بِالنَّهَارِ ثُمَّ يَبْعَثُكُمْ فِيهِ لِيُقْضَىٰ أَجَلٌ مُّسَمًّى ۖ
ثُمَّ إِلَيْهِ مَرْجِعُكُمْ ثُمَّ يُنَبِّئُكُم بِمَا كُنتُمْ
تَعْمَلُونَ
It is He who doth take your souls by night, and hath knowledge of all
that ye have done by day: by day doth He raise you up again; that a
term appointed be fulfilled; In the end unto Him will be your return;
then will He show you the truth of all that ye did. [6:61]
اللَّـهُ يَتَوَفَّى الْأَنفُسَ حِينَ مَوْتِهَا وَالَّتِي لَمْ تَمُتْ
فِي مَنَامِهَا ۖ فَيُمْسِكُ الَّتِي قَضَىٰ عَلَيْهَا الْمَوْتَ
وَيُرْسِلُ الْأُخْرَىٰ إِلَىٰ أَجَلٍ مُّسَمًّى ۚ إِنَّ فِي ذَٰلِكَ
لَآيَاتٍ لِّقَوْمٍ يَتَفَكَّرُونَ
It is Allah that takes the souls (of men) at death; and those that die
not (He takes) during their sleep: those on whom He has passed the
decree of death, He keeps back (from returning to life), but the rest
He sends (to their bodies) for a term appointed verily in this are
Signs for those who reflect. [39:42]
Actually death in Islam is not merely an almost instantaneous phenomena of soul being detached from the material body, but it is a period of life and takes some time which may be comparable to the whole person's life in length, although it would seem like almost instantaneous to us. Dream is similar to death in that soul is detached from the material body in both of them. Even note that the word یتوفی in these two verses comes from وفی which implies completely returning back something in the sense of being troth. So that the souls can (not necessarily do as it would be clear from what follows) experience things and states as a death person experiences.
Not every asleep person would dream, but if he dreams then the dreams are three-fold:
Dreams with bodily origin, for example some dreams seen after eating heavy meals, or some dreams while the person is ill and in fever, or some dreams when the body is not in a comfortable state; although not all dreams in these cases are necessarily fake
Dreams rooted in the happenings experienced by the guy before falling asleep, say during the day or the past couples of days; or thoughts that have affected the person much so that intensely engaging his mind such that he cannot stop thinking about them (including demands and wishes or scary things or similar things) even the person may be not thinking about the subject but if the subject has affected his soul much he would recall the issue while asleep in the form of a dream
Dreams that are honest, captured by the soul during its travel in the other world. Such dreams occurs mainly in some specific hours of the night. Everyone may experience such dreams. However such dreams can either be symbolic or realistic. There are some issues about why the dreams are usually symbolic but let me pass over them, you can set a research about it by yourself, if you mind.
During the honest dreams (the third category above) people may be shown some facts about past, present or future, regarding themselves or others; they may be let experience some situations, and even they may encounter some examinations of Allah while being in such dreams. mainly the honest dreams that are of "news" type, about some facts, may be symbolic or realistic, the other kind of honest dreams are almost always realistic or almost realistic. Those dreams that are symbolic but need to be interpreted and the interpretation of the dreams based on the symbols observed is itself a science, though not an ordinary science, but anyway teachable and learn-able. This science is referred to in Quran with the title "تأویل الأحادیث" (the interpretation of stories), e.g. see [12:6]:
وَكَذَٰلِكَ يَجْتَبِيكَ رَبُّكَ وَيُعَلِّمُكَ مِن تَأْوِيلِ
الْأَحَادِيثِ وَيُتِمُّ نِعْمَتَهُ عَلَيْكَ وَعَلَىٰ آلِ يَعْقُوبَ
كَمَا أَتَمَّهَا عَلَىٰ أَبَوَيْكَ مِن قَبْلُ إِبْرَاهِيمَ وَإِسْحَاقَ
ۚ إِنَّ رَبَّكَ عَلِيمٌ حَكِيمٌ
"Thus will thy Lord choose thee and teach thee the interpretation of
stories (and events) and perfect His favor to thee and to the
posterity of Jacob - even as He perfected it to thy fathers Abraham
and Isaac aforetime! for Allah is full of knowledge and wisdom."
Or similarly [12:21] and [12:101], and the applications of this science is also reported in [12:36,37], [12:45-49] and [12:100].
Also about dreams you may like to see the following verses:
وَإِذْ قُلْنَا لَكَ إِنَّ رَبَّكَ أَحَاطَ بِالنَّاسِ ۚ وَمَا جَعَلْنَا
الرُّؤْيَا الَّتِي أَرَيْنَاكَ إِلَّا فِتْنَةً لِّلنَّاسِ
وَالشَّجَرَةَ الْمَلْعُونَةَ فِي الْقُرْآنِ ۚ وَنُخَوِّفُهُمْ فَمَا
يَزِيدُهُمْ إِلَّا طُغْيَانًا كَبِيرًا
Behold! We told thee that thy Lord doth encompass mankind round about:
We granted the vision which We showed thee, but as a trial for men,-
as also the Cursed Tree (mentioned) in the Qur'an: We put terror (and
warning) into them, but it only increases their inordinate
transgression! [17:60]
قَدْ صَدَّقْتَ الرُّؤْيَا ۚ إِنَّا كَذَٰلِكَ نَجْزِي الْمُحْسِنِينَ
"Thou hast already fulfilled the vision!" - thus indeed do We reward
those who do right. [37:105]
لَّقَدْ صَدَقَ اللَّـهُ رَسُولَهُ الرُّؤْيَا بِالْحَقِّ ۖ
لَتَدْخُلُنَّ الْمَسْجِدَ الْحَرَامَ إِن شَاءَ اللَّـهُ آمِنِينَ
مُحَلِّقِينَ رُءُوسَكُمْ وَمُقَصِّرِينَ لَا تَخَافُونَ ۖ فَعَلِمَ مَا
لَمْ تَعْلَمُوا فَجَعَلَ مِن دُونِ ذَٰلِكَ فَتْحًا قَرِيبًا
Truly did Allah fulfill the vision for His Messenger: ye shall enter
the Sacred Mosque, if Allah wills, with minds secure, heads shaved,
hair cut short, and without fear. For He knew what ye knew not, and He
granted, besides this, a speedy victory. [48:27]