First, let’s be clear that the term does not refer to a scientific theory about the brain, but, for instance, refers to my ability to form the theory that you have a mind. I can’t know your mind directly, I can only speculate that there is something going on in your head, so I can only theorize that you have a mind, and I hope you will take my word for it, that I have a mind too!
I quote now from Wikipedia: “Theory of mind appears to be an innate potential ability in humans, but one requiring social and other experience over many years to bring to fruition. Different people may develop more, or less, effective theories of mind. Empathy is a related concept, meaning experientially recognizing and understanding the states of mind, including beliefs, desires and particularly emotions of others, and is often characterized as the ability to `put oneself into another's shoes’.”
For an actor, to create a character that appears to have a theory of mind is one of the biggest challenges he faces.