There are 3 kind of dreams in Islam :
1. Rahmani - The truthful dreams. These are the dreams of the Prophets and of the righteous people who follow them. They may also happen to other people, but this is very rare, such as the dream of the kaafir king which was interpreted for him by Yoosuf (peace be upon him). True dreams are those which come true in real life as they were seen in the dream.
2. Nafsani - The dream stemming from personal desire, psychological, they come from within a person.
3. Shaytani - The dream coming from the devil (Shaytaan)
The Prophet (peace and blessings of Allaah be upon him) said: Dreams are of three types: a dream from Allaah, a dream which causes distress and which comes from the Shaytaan, and a dream which comes from what a person thinks about when he is awake, and he sees it when he is asleep. (al-Bukhaari, 6499; Muslim, 4200)
When he sees something that happens to him in real life, or he wishes it would happen, and he sees it very realistically in his dream; or he see what usually happens to him when he is awake or what reflects his mood. These dreams usually speak of the future or the present, rarely of the past.
See: Fath al-Baari, 12/352-354
True dreams are a part of Prophethood, as it was reported that the Prophet (peace and blessings of Allaah be upon him) said: True dreams are one of the forty-six parts of Prophethood. (al-Bukhaari, 6472; Muslim, 4201)
Dreams marked the onset of Revelation (al-Bukhaari, 3; Muslim, 231).
The truthfulness of the dream is related to the sincerity of the dreamer. Those who have the most truthful dreams are those who are the most truthful in speech. (Muslim, 4200)
Towards the end of time, hardly any dreams will be untrue. The Prophet (peace and blessings of Allaah be upon him) said: That will be because the Prophethood and its effects will be so far away in time, so the believers will be given some compensation in the form of dreams which will bring them some good news or will help them to be patient and steadfast in their faith. (al-Bukhaari, 6499; Muslim, 4200)
The same may be said of the miracles which appeared after the time of the Sahaabah. This did not happen during their time because they did not need them, due to their strong faith, but the people who came after them needed them (the miracles) because their faith was weak.
Abu Sa’eed al-Khudri (may Allaah be pleased with him) said: the Prophet (peace and blessings of Allaah be upon him) said: If any one of you sees a dream that he likes, this is from Allaah, so let him praise Allaah for it and talk about it to others. If he sees other than that, a dream that he dislikes, this is from the Shaytaan, so let him seek refuge with Allaah from its evil and not mention it to anyone, for it will not harm him. (Narrated by al-Bukhaari, 6584, and Muslim, 5862).
The dreams of the Prophets are wahy (revelation) for they are protected from the Shaytaan. The Ummah is agreed upon this. This is why Ibraaheem set out to fulfil the command of Allaah to sacrifice his son Ismaa’eel when he saw that in a dream; may peace be upon them both.
The dreams of people other than the Prophets are to be examined in the light of the clear Wahy [i.e., the Qur'aan and Sunnah]. If they are in accordance with the Qur’aan and Sunnah, all well and good; otherwise, they should not be acted upon. This is a very serious matter indeed, for many of the innovators among the Sufis and others have gone astray because of this.
Whoever wants to have true dreams should strive to speak honestly, eat halaal food, adhere to the commandments of sharee’ah, avoid that which Allaah and His Messenger (peace and blessings of Allaah be upon him) have forbidden, sleep in a state of complete purity facing the Qiblah, and remember Allaah until he feels his eyelids drooping. If he does all this, then his dreams can hardly be untrue.
The most truthful of dreams are those that are seen at the time of suhoor [just before dawn], for this is the time when Allaah descends and when mercy and forgiveness are close. It is also the time when the devils are quiet, unlike the time of darkness just after sunset, when the devils and devilish souls spread out.
(See Madaarij al-Saalikeen, 1/50-52)
Abu Qutaadah said: the Prophet (peace and blessings of Allaah be upon him) said: Good dreams come from Allaah, and (bad) dreams come from Shaytaan. Whoever sees something that he dislikes, let him spit to his left three times and seek refuge with Allaah from the Shaytaan, for it will not harm him. (Narrated by al-Bukhaari, 6594, and Muslim, 5862). The spitting referred to here is a soft, dry spitting with no saliva ejected.
It was reported from Jaabir (may Allaah be pleased with him) that the Prophet (peace and blessings of Allaah be upon him) said: If any one of you sees a dream that he dislikes, let him spit to his left three times, and seek refuge with Allaah from the Shaytaan three times, and turn over from the side on which he was sleeping. (Narrated by Muslim, 5864)
Ibn Hajar said: to sum up what has been said about good dreams, we may say three things:
A person should praise Allaah for the good dream
He should feel happy about it
He should talk about it to those whom he loves but not to those whom he dislikes.
To sum up what has been said about bad dreams, we may say four things:
He should seek refuge with Allaah from the evil of the dream
He should seek refuge with Allaah from the evil of the Shaytaan
He should spit to his left three times when he wakes up
He should not mention it to anyone at all.
In al-Bukhaari, Baab al-Qayd fi’l-Manaam, a fifth thing was narrated from Abu Hurayrah, which is to pray. The wording of the report is: whoever sees something he dislikes (in a dream) should not tell anyone about it; rather he should get up and pray. This was reported as a Mawsool report by Imaam Muslim in his Saheeh.
Muslim added a sixth thing, which is to turn over from the side on which one was lying.
In conclusion, there are six things to do, the four mentioned above, plus praying two rak’ahs, for example, and turning over from the side on which one was lying to lie on one’s back, for example.
See Fath al-Baari, 12/370.
According to a hadeeth narrated from Abu Razeen by al-Tirmidhi, he should not tell anybody about it except a very close friend who loves him very much, or who is very wise. According to another report, he should not talk about it except to one who is wise or one who is dear to him. According to another report, he should not tell of his dream except to a scholar or one who will give sincere advice. Al-Qaadi Abu Bakr ibn al- Arabi said: as for the scholar, he will interpret it in a good way for him as much as he can, and the one who will give him sincere advice will teach him something that will be of benefit to him and will help him to do that. The one who is wise is the one who knows how to interpret it and will tell him only that which will help him, otherwise he will keep quiet. The one who is dear, if he knows something good he will say it, and if he does not know or he is in doubt, he will keep quiet.
See Fath al-Baari, 12/369
Imaam al-Baghawi said:
Know that the interpretation of dreams falls into various categories. Dreams may be interpreted in the light of the Qur’aan or in the light of the Sunnah, or by means of the proverbs that are current among people, or by names and metaphors, or in terms of opposites. (Sharh al-Sunnah, 12/220)
He gave examples of this, such as:
Interpretation in the light of the Qur’aan: such as a rope meaning a covenant, because Allaah says (interpretation of the meaning):
And hold fast, all of you together, to the Rope of Allaah [Aal Imraan 3:103]
Interpretation in the light of the Sunnah: such as the crow representing an immoral man (faasiq), because the Prophet (peace and blessings of Allaah be upon him) called it such.
Interpretation by means of proverbs: such a digging a hole meaning a plot, because people say Whoever digs a hole will fall in it.
Interpretation by means of names: such as seeing a man called Raashid meaning wisdom.
Interpretation by means of opposites: such as fear meaning safety, because Allaah says (interpretation of the meaning):
And He will surely give them in exchange a safe security after their fear [al-Noor 24:55]
- Sheikh Muhammed Salih Al-Munajjid
Article from islamqa.com