I DO agree with Janka's "Simple rules first, complications later". As it is 'later' now, I am going to add a conceptual difference or two.
Some words of solace first. :-)
The concept of German -hin and -her is identical to the English concept of to and fro. Look at the following sentences:
This guy's getting on my nerves! He's running to and fro all day long.
Dieser Typ geht mir auf die Nerven! Den ganzen Tag rennt er hin und her.
You can safely transfer this concept to all adverbs containing hin- oder her-.
===========================
The two concepts are not necessarily congruent in verbs or do not appear in both languages to the same degree:
A) plus/minus identical, if we think laterally:
Stell das hin! = Put it down! (-> to that place there)
Da geh' ich nicht hin. = I won't go there!
Woher hast du das? = Where did you get that? (-> from were did
you bring it here?)
However, B):
Die Tassen gehören nicht dáhin. / Da gehören die Tassen nicht hin. (= 2 signals: da + hin) Meaning: We don't put the cups there, but we usually say: The cups don't go here. (!) Tja, ... ;-)
Das gehört nicht hierher! (= 2 signals: hier + her) = That
doesn't belong to the subject! No to/fro(m), here/there in English. Mental acrobatics are needed to image the German concept: from you, speaker (= B), to here, to our subject (= A)
Cheers!