Dreams are broken into three parts according to the Sunnah:
Ru’yaa – good visions (dreams)
Hulum – bad dreams
Dreams from one’s self

Abu Hurayrah narrated Muhammad (S) said, “There are three types of dreams: a righteous dream which is glad tidings from Allah, the dream which causes sadness is from Shaitan and a dream
from the ramblings of the mind. (Muslim)

True/Good Dreams
We can see true dreams are from Allah Ta’ala as Muhammad (S) said, “True dreams are from Allah and bad dreams are from Satan” (Bukhari).

True believers are more likely to happen to those who are truthful in their lives as Muhammad (SAW) said, “Those of you with the truest dreams will be those who are most truthful in speech”
(Muslim) .

Good dreams are also from Allah Ta’aala. Prophet Muhammad (SAW) said, “If anyone of you has a dream that he likes then it is from Allah. He should thank Allah for it and narrate it to
others.” (Bukhari) Good deeds consist of people doing Halaal (lawful) acts.

One should share their dreams with those they like as Muhammad (SAW) said, “If one sees a good dream, let him expect good, and not tell it except to those he likes.” (Muslim) An example of this is Yaqoob (AS) telling his son, Yusuf (AS) concerning his dream about eleven stars and the sun and the moon prostrating to him (scholars have said the eleven stars were his brothers, and the sun and the moon represented his mother and father): “He said, “O my son! Relate not your vision to your brothers lest they arrange a plot against you.  Verily! Satan is to man an open enemy.” (Surah Yusuf 12:5) We know the half-brothers of Yusuf were jealous of him, to begin with so telling them the dream would probably only serve to increase the jealousy.

Muhammad (s.a.w) also told us, “Nothing is left of prophethood except glad tidings.” Those with him asked, “What are glad tidings?” He (S) replied, “Good dreams.” (Bukhari).

Bad Dreams
As stated above bad dreams are from Satan Muhammad (s.a.w) told us what to do upon seeing a bad dream. “So when one of you sees a dream which he does not like, he should spit on his left side
three times, seek refuge with Allah from Satan thrice, and change the side which he was lying (Muslim) and in another narration in Muslim, Muhammad (S) told us if we spit three times and seek refuge from Allah then it (the dream) will not harm them.” (Muslim).

Muhammad (s.a.w) also told us that if we saw a bad dream to “stand up and offer prayer.” (Muslim).

Bad Dreams Should Not Be Disclosed
Muhammad (s.a.w) said, …If he has a dream that he dislikes, then it is from Satan He should seek refuge with Allah from its evil, and he SHOULD NOT MENTION IT TO ANYBODY, then it will not harm him.” (Bukhari) If one does tell somebody about the bad dream then there could be the chance that some harm will come out of it.

Dreams from One’s Self
These dreams come from one’s thoughts and are neither from Allah nor Satan

Lying About Dreams

Prophet Muhammad (s.a.w) said, “Indeed the worst of lies is that of a person who falsely claims to have a dream.” (Bukhari) also ‘Whoever claims to have a dream that he did not have, will be ordered
to tie two barley grains together, which he will never be able to do; and if somebody eavesdrop on some people’s conversation which they didn’t want him to hear or they tried to keep away from him, then molten lead will be poured into his ears on the Day of Resurrection;  and whosoever makes a picture (of a being with a soul) will be punished on the Day of Resurrection and (will) be ordered to put a soul in it, which he will not be able  to do.” (Bukhari)