Just like other kosoado pronouns in Japanese, we can divide the meaning of these words this way:
- konata こなた
This person here.
- sonata そなた
That person there, close by.
- anata あなた
That person over there, far away..
- donata どなた
However, the above are the words original meanings. In modern Japanese the first two, konata and sonata, are practically not used anymore. (if you're looking for anime that use these, take a look at Katanagatari 刀語, where Tomoko uses the word sonata a lot)
So if the two first words aren't used, what happens to the last two? Well, the word anata can be used as one of the many ways to say "you" in Japanese, which is kind of weird, because logically thinking that should be sonata since the guy you call "you" is usually close to you, but hey, who am I to argue with the language.
The last word, donata, is mostly used in phrases to polite ask "who are you?" For example:
- donata desu ka? どなたですか？
Who is it?
So this is the explanation behind these pronouns about people.