"her" gives the direction towards the viewer and "hin" away from the viewer.
similarly "aus" means outside and "ein" inside. There are four possibilities: heraus, hinaus, herein, hinein and use of these depend upon the location of the viewer or speaker and movement away or towards the viewer. Examples:
Der Student geht ins Zimmer hinein (from the pont of view of someone who is outside the room)
Der Student kommt ins Zimmer herein (from the point of view of someone in the room)
Der Student geht vom Zimmer hinaus (from the pont of view of someone in the room)
Der Student komm vom Zimmer heraus (from the pont of view of someone outside the room)
Der Student geht ins Zimmer hinein (from the point of view of someone outside the room)
so herauswerfen means someone throws an object from one (closed) locaiton to outside towards the viwer:
Herr Müller hat den Müll aus dem Zimmer herausgeworfen. You are standing outside the room and Herr Müller threw the garbage from his room outside towards the viewer (who is outside the room).
Herr Müller hat den Müll in die Mülltonne "hineingeworfen" (away from Müller and inside Mülltonne)
Die Katze hat den Müll von der Tonne herausgeholt.