Dreams and visions

When you sleep,you often have dreams and visions .Dreams at times are things you were thinking about before you slept,or that are weighing heavily on your mind.Visions on the other hand are predictions of the future,which may or may not come true.how do you distinguish between dreams,visions and when your brain is merely wandering off ?

Visions don’t change, but dreams do.