If you are dreaming then there's someone else in your dream who you don't know or never seen. How do these people get into dreams?
Psychology can be in the process of dream, our brains have neurons that can determine the long and short memories. But with unknown people, we don't know for sure how they work. But emotions can play a big role on these people.
Our dreams are usually altered and changed by what we see, stuff we saw that day often find there way into our dreams, not uncommon is people we see everyday but often might not realize we notice or register, like kind of like when you walk into a room you may see lots of people but you may not see all there faces or something you know they are there but you don't directly see them.
The interesting fact is that every person you see in your dreams you've seen in your real life. Our brain does not create faces, it just takes the ones that are already there, even if we don't realize it. So, all the unknown people you see in your dreams, you've seen in your real life already. It doesn't change the fact that they are unknown though.
When you see people but never actually talk to them causes your brain to unconsciously have curiosity about them and therefore they end up in your dreams. So if you have a dream about a stranger then most likely you have actually seen the stranger but never talked to him in any sort of way.