The adverb "hin" describes movement away from the speaker.
The adverb "her" describes movement towards the speaker.
We use the questions "woher?" and "wohin?" ask about the direction of movement.
"Woher?" and "wohin?" can be written together or separate.
We can combine locative adverbs with "hin" or "her" - this gives us not only the location but also the direction of movement. Is the movement towards the speaker or away from the speaker?
Examples: Dahin, daher, dorthin, dorther, hierhin, hierher
In this example, "dorthin" emphasizes that I am going there AND that the movement is away from me. For English speakers, this might seem unnecessary and redundant - OF COURSE if I am going there it means I am going in a direction away from me.
This happens quite often with English speakers learning about "hin" and "her" - they ask "Do I have to include this extra information?" In German, you really do need to include this extra information - otherwise it is grammatically incorrect AND sounds unnatural.
"Hin" and "her" are often used as a prefix with separable verbs.
They can be combined with all verbs involving movement, telling you the direction of the movement.
To give an even more specific direction, "hin" and "her" are often also combined with a preposition. We don't just want to know if we're going towards or away from the speaker, but if we are also up / under / around / etc.
When combining "hin" and "her" with a preposition (i.e. hinaus, herüber, etc.), you can also say it more quickly and easily by using a shorter version. This can be done when it's standing on its own or being used as a prefix of a separable verb.
raus = hinaus / heraus rein = hinein / hinaus
rauf = hinauf / herauf runter = hinunter / herunter
rüber = hinüber / herüber
raus = hinaus / heraus
Similarly so: rauslaufen, rauskommen, rausfahren, rausrennen, rausschwimmen, raustragen, rausschauen …
rein = hinein / herein
Similarly so: reinlaufen, reinkommen, reinfahren, reinrennen, reintragen, reinschauen, …
rauf = hinauf / herauf
Similarly so: rauflaufen, raufkommen, rauffahren, raufrennen, rauftragen, raufklettern,
runter = hinunter / herunter
Similarly so: runterlaufen, runterkommen, runterfahren, runterrennen, runtertragen,
rüber = hinüber / herüber
Similarly so: rüberlaufen, rüberkommen, rüberfahren, rübertragen, rüberbringen, …
"rüber" can also mean from going from one side to the other in the metaphorical sense.
More information about locative adverbs.
To understand the differences between the version with preposition and adverbs, take a look at the section on locative prepositions.