Sorry, I disagree with both answers so far. It's not subtle at all and it is quite clear opposites!
"hin" means to
"her" means from
Notice the English "to and fro" is precisely paralleled by German "hin und her".
"Her" relates to from where you come. "Wo kommst du her?" -- where do you come from?
Hingehen is go to the destination.
Herkommen is come from the source.
There is something about Bavarian / Austrian which might turn out to feel a bit like an exception, but I can't quite put my finger on an example now. But otherwise it's pretty clear.
Some more points from the discussion in the comments.
I think for a non-native German speaker it helps to really firmly take the position that "her" means "from" and "hin" means "to". That way you "feel" the dissonance correctly when the superficial translation may contradict this.
Consider the combinations:
"herbei", "hervor" as opposed to "hinzu" and "hinauf"
OK, now also look at the fine nuances of "herein" and "hinein" to nicely illustrate this. It seems subtle, but it is not!
"Bitte kommen sie herein." -- you never say "kommen sie hinein". And more commonly in spoken language "Kommen sie rein" where "rein" is just a contraction or loss of the "he-" of "herein".
You ask someone to come "herein" because you are inside and he is outside, and that him being outside is what you feel in this form of speech.
You tell someone to go "hinein" if you are outside and encourage him to go inside. "Hereinkommen", "hineingehen", but almost never "hineinkommen" or "hereingehen" (of course language is a living thing, so you might hear these sometimes, but it sounds odd.)
Also, applying what I just said to the example in the original question:
Hier sind wir ungestört. Keiner geht hier hin.
is a perfect illustration. The focus is on here, where to someone might come, but rarely does, so therefore we are undisturbed.
It doesn't really mean "go there" it's not a good translation in this case. The best translation is
Here we are not disturbed. Nobody goes here.
And do you feel you wanted to say in English "Nobody comes here" instead of "nobody goes here"? Yes! The same is true in German. "Keiner geht hier hin" is a little odd. Just a little odd to mean something more than "nobody comes here". What you learn from this oddity is that the speaker seems to not quite be at this point. It's as if he was pointing to another place nearby saying, let's go here (not there because they are almost at the place now.) But "geht hier hin" is still spoken in a kind of syntony with someone who might also not be there but who would choose not to go there, which is why this is a good place to remain undisturbed.
You could just as easily say:
Let's go over there, where we won't be disturbed. Nobody ever goes there.
Lass uns dort hin gehen, wo wir ungestört sind. Niemand geht dort hin.
And in all that musing about the fine nuances, not once did it cross my mind that you would use "her" in any way! Because it just is not subtle!
"Keiner kommt hier her" is really weird. Firsly, you put (her) in parenthesis as if it was optional. It is not! "Keiner kommt hier" is not a complete phrase. It doesn't work! But even with "her", it sounds so weird. But I guess idiomatically it does work (and this is what I felt with this Bavarian thing, ... I can go even deeper on that). "Keiner kommt hier her" you can say it. But it might be an incomplete version of "Keiner kommt hier herrein" -> "Keiner kommt hier rein". If you speak of a storage room to be undisturbed for some activity you'd rather be undisturbed. Remember "her" "rein" and "herein". "Keiner kommt hier rein", is spoken from the perspective of the two being in that broom closet doing their thing they want to be undisturbed to be doing, and from that perspective "keiner kommt herein" is the same as I said above. "Hereinkommen". You see?
It is totally logical, you get the feeling and the fine nuance of different feeling if you just trust the hard rule that "hin" is "to" and "her" is "from".
At the risk of repeating myself, there's something I need to still put forward systematically. When contemplating "herkommen" vs. "hingehen" people are making the mistake to confuse the strong semantics of "kommen" vs. "gehen" with "her" and "hin".
If you know anything about functions (as in functional programming) and you defined verbs as functions, then you might say "kommen" is a verb for abstract verb move which takes the origin as an optional argument but which has the destination implicitly weakly bound as the present location in the context of the situation in which the verb is used.
"Gehen" exists as a synonym to the abstract verb move, but also as the contrary of "kommen" in the sense that it takes an optional argument of destination, while the source is implicitly and weakly bound to the present location in the context of the situation in which the verb is used.
It's the exact same semantics as in English "come" and "go".
"Her" is from (whence). "Hin" is to(ward). "Hin und her" is the exact cognate of "to and fro" (also "hither and whither").
And in the same way now, you easily combine "come from" and "go to" where from and to are the prepositions you need to bind those optional arguments just mentioned. In German you would use the prepositions "kommt von" and "geht nach" to bind these arguments respectively.
This is where the exact comparison with English now fails, because "her" and "hin" are not also prepositions, they are prefixes to the verb, which emphasize what is already implied in the verb when you combine them as common "herkommen" and "hingehen".
In terms of Shannon information theory, these common combination provide little extra information, little surprise value beyond what you already expect from the naked verbs.
The more it gets interesting if any of these expectations is violated.
"hinkommen" and "hergehen" -- while much less common, they do exist. And the nuance of meaning is now in the dissonance, the surprise, the unexpected. Still, the semantics of "kommen" and "gehen" is leading the meaning, you cannot overcome the definition of "kommen" and "gehen" by these prefixes. But you create a nuance. "Hinkommen" is much more rare than "hergehen" and this is because "gehen" has this dual meaning, once as a perfect opposite to "kommen" but also as the abstract verb move as any location translation operation.
So "hergehen" could be someone who goes past you and you observe. "Vorbeigehen" would be more specific. "Dahergehen" "hergehen" "daherkommen" "dahergelaufen" has a sense of negativity, as if the speaker was looking down on thee one who comes and goes past. As if he comes from God knows where, think a whiff of xenophobia.
Here is a great example: "Also lieber abhacken, als jedem Daherkömmling ein kurzes, zugegeben unerlaubtes, Labsal zu gönnen!"
And this is the interesting thing you do with "kommen" that you can't really do with "gehen". "Kommen" has a strong substantive "Kunft", "die Ankunft". And also "Kömmling" which is a certain diminutive-sounding reference to the one who comes.
I apologize for my long winded answers which I tend to give here, because what interests me to be on this forum is to think deeper about the logic and the feeling and the peculiarities of my mother tongue.