It's an ability to see things from another person's perpective, which may be different to your own.
As
@Crossbreed says, autistic people usually can predict what other people are likely to know, but not what they are likely to feel.
Social communication involves not only the exchange of words, but also social cues in the form of emotional messages, or 'ememes.' When people talk, there is a flow or emotional information back and forth, and they are continually monitoring and checking the other person for their emotional feedback. We are not so good at picking up on these cues or knowing how to respond to them, and so often fail to respond appropiately. So, we are misunderstood: we are considered rude, or abrupt, inappropiate or a bit odd.
If someone says to me, "I don't feel too good today," this is a social cue, and I'm supposed to respond by asking why and trying to comfort them. But in my mind, this is just information. I think, "Oh, ok" or "What do you want me to do about that?" not because I don't care, but because I don't know what to do with the information. I have learned to ask the person why and try to help, and this is a good example of masking, but even so, people often what more than I can give. I can help them on a practical, not an emotional level. So I might give advice or offer solutions to whatever problem the person has, but what they really want is emotional comfort or validation. This comes natually to most NTs - they have an instinctive understanding of what the person is feeling, what they need and how to give them that. When we fail to give, we are accused of being insensitive, or cold and distant, and the experts will tell us that we have no theory of mind, because we have apparently failed to see the other person's emotional perspective and respond to it.
Also, we are often accused of not having a theory of mind simply because we have a different opinion and we stick to that opinion. Example: I can't stand people smoking in public places and believe this should be strictly banned, and I often tell people this, including people who smoke. They may come up with counterarguments, but I believe that I'm right and will insist on my opinion. I then get told: I'm rigid, stubborn, self-centered, and lack theory of mind because, again, I apparently fail to see things from another person's perspective and therefore lack theory of mind. It's not true that I'm not aware of a different perspective, it's simply because I have an opinion that happens to be different to theirs and I stick to it. Ironic really, because in this case, if anything, they are the ones who lack theory of mind, not me!