Who knows what? Essentially, this question is the basis of the complex concept called Theory of Mind – which is very misleadingly labeled. No, it’s not a theory that explains how mind works, as you might assume. It’s a process within our minds that allows us to separate and distinguish between what we know ourselves and what we know that other people know – or don’t know. It’s a skill that is critical for accomplishing effective social interaction in the world. A better term might be Theory of Other People's Minds.
When we talk to another person, we have to have an idea of what that person knows (and doesn’t know) with respect to what we know, in order to assess how we'll interact with that person. You wouldn’t want to tell somebody something that they already know all the time, right? By the same token, you wouldn’t want to tell somebody something that has no application to anything relevant in his or her life, either. Our ability to keep track of other people’s knowledge, preferences and familiarities is a difficult and slow developing skill, but a valuable one to develop in life.
Having a theory of mind allows us to interact with the world in a more sophisticated, nuanced way. We can tailor our expressions to different individuals so that conversations allows for mutual benefit. We’re also able to pick out good gifts for people (because we’re able to keep track of what they like), or we can invite people to events that they’d enjoy, or introduce them to other people who might gain from that relationship. It’s a way of sorting our surroundings.
Stereotypes and bias are also influenced by theories of mind. The human brain is efficient – or in other words, lazy – and we tend to rely on generalized expectations of people based on associations that they activate in our minds. This is the potential downside of theories of mind – if left unchecked, they can narrowly limit our expectations of people based on our assumed associations. In order to combat this, we can make an effort to remember that individuals are entitled to their own, unique qualities. Diversity is a sign of a healthy society.
Like all social concepts, theory of mind has tremendous context sensitivity at a moment-by-moment level. The theories that you may hold continually evolve and change throughout every experience that you have. But that’s life – everything is relative.
Here's some more reading:
Susan Anderson and Regina Miranda: "Transference: how past relationships emerge in the present" [PDF]