Derech Hashem 3:1:6, a classical work by the Ramchal, that dips its toe into some Kabbalah, as well as other earlier traditions, gives us many entry routes into this question. I will summarise at the end:
And note that when man sleeps, his faculties rest and his emotions are
quiet; and his intellect also rests and is quiet. Only his imagination
is active and goes and imagines and creates content according to what
comes to it from the remnant of what he depicts during the time he is
awake and from what comes to it from the vapors and gases that go up
to his brain - whether from the natural humors or whether from foods.
And this is the matter of everyone's dreams. But the Creator, may He
be blessed, also embedded into it that the higher spirit that we
mentioned slightly remove itself at this time from its physical
connections at this time. So portions of itself - down to the essence
- arise and separate from the body. And only one part - which is the spirit - remains with the lower spirit. And behold, the separated
portions float, according to what is allowed them, and encounter and
interact with spiritual entities - whether with supervisors of nature
or with angels of prophetic reception or with demons, according to
what comes to it from one of the various causes. And sometimes the
content that it grasps is drawn down and unfolds to the lower spirit,
such that an image is aroused and creates content according to its
ways. Yet it is possible that the content that it grasps be true or
false, due to the intermediaries through which it grasped it. And this
content itself is drawn down to the imagination: Sometimes it is
conceived of with great confusion, and much jumbling with the empty
images that are drawn from the vapors; though sometimes it is with
great clarity. And even information and foreknowledge about what will
happen to a man in the future can reach him in these ways. And this
happens according to His decree, may He be blessed, such that He
informs the soul through one of His servants of any given type, and
the content gets to the spirit in its imagination - either obscurely
or clearly, based on what is decreed by the Supreme Wisdom. And about
this matter is it stated (Job 33:15-16) , "In a vision of a dream at
night, etc... He then open s the ear of people." It comes out that
dreams of imaginative content are either from [the imagination] itself
or from that which is aroused by the soul according to that which it
grasps. However in all [of the latter], the action is only from one of
the spiritual forces that informs the soul. Then the soul brings it
down to the imagination, as we have written. And if the force is from
the holy servants, the thing will be true; whereas if it is from the
opposite forces, the matter will be false. And this is what is written
(Berakhot 55b), "Here it was through an angel, but there it was
through a demon." But all of them contain some mixture of empty images
that are only from the imagination. And that is what is written
(Berakhot 55a), "It is impossible for a dream to be without idle
things." However there are other dreams that exist, and they are
prophetic dreams. [Translation by Rabbi Francis Nataf]
Human beings have a faculty called "imagination" in their intellect (as part of their soul, and this is connected with the Limbic system in the brain), and it is able to form the imagery we see in dreams, including the characters in those dreams.
Another point is that portions of our soul leave our bodies when we sleep and interact with spiritual forces. While we do not experience this consciously, or remember it, it can lead to influence that passes down our soul links until it reaches the part of the soul that never left the body, and then into the imagination.
This is all dependant on Hashem's decree. If He wants a true or false matter to be transmitted to a persons' dreams, He arranges that this should happen. This can include information about the future.
Nonetheless, it doesn't seem this sort of experience will necessarily lead to the actual spiritual forces themselves featuring in our dreams, or any other entities. Ultimately it is still taking place in the imagination, either clearly or obscurely, and the characters in our dreams are still conjured up, even if they are images of real people and real events.