Joseph dreamed dreams that were very symbolic. He dreamed about sheaves of grain bowing down, and the sun, moon and stars bowing down to him (Genesis 37). This occurred when he became a ruler in Egypt and everyone, including his own family, bowed down to pay him honor.
Pharoah's servants also had dreams, which were also highly symbolic. The dreams tell of what would happen to each servant. The chief baker and the chief cupbearer's dreams can be found in Genesis 40.
Pharoah himself had two dreams about ears of grain and cows. Pharoah's dreams have the same meaning repeated twice just like Joseph's dreams were. Joseph explained: "Now as for the repeating of the dream to Pharaoh twice, it means that the matter is determined by God, and God will quickly bring it about" (Genesis 41:32).
------------------------
Sometimes our dreams can be very odd and may be influenced by TV or our own imaginations. This is especially true if those dreams are symbolic, but don't have God speaking to us directly. So the way to know if those dreams come from God is if they are repeated with different characters but have the same meaning. If a dream is repeated (different dreams having the same underlying meaning), then it is determined by God and God will quickly bring it about.
Not all dreams are repeated. For example before the birth of Jesus, Joseph planned to send Mary away secretly because she was pregnant. But an angel in a dream told Joseph to take Mary as his wife and to name the child Immanuel (Matthew 1:18-25). So this dream was sent by God because of what the angel told him. But some dreams like ears of corn and cows are harder to tell whether they are from God. That is why such dreams are sometimes repeated so that a person can know that those dreams are from God.
As can be seen, not all dreams are from God. We can be influenced by our culture, friends, TV, etc. to have various dreams. So if you're not sure, ask God whether a dream is from Him. If in the dream, someone tells you to do something that is against the Bible (even if that person claims to be a prophet or angel), then the dream does not come from God.