I can't understand the function of this diode
Figure 1. Buck converter.

Inductors don't like you to change the current suddenly. When you try large voltages are induced.


In the on-state current flows through the inductor to the load and the filter capacitor.
In the off state there is no current supplied by the PSU. The inductor tries to keep the current flowing and since the right side of the inductor is held at the output voltage the left side of the inductor is driven below zero volts until the diode starts to conduct. This will maintain the current for a short period of time.
As the inductor current decays the feedback (in your circuit) will trigger another pulse from the converter and the next cycle begins.


A few points:


  Being a DC output, when the IC is shut down, 


The IC isn't shutting down. It's just turning off its output.


  ... the inductor will release charge flowing in all directions. 


Not really. It will flow in the same direction as when the converter output was on.


  IC output will prevent sinking that current, ...


Yes, the output is switched off so no current flows back into the converter.


  ... so it must take the load way. 


Correct.


  Is the voltage drop of the diode what is important here, ...


The voltage drop of the diode is important to keep the efficiency high.


  ... maintaining the orientation of current? 


The orientation of the diode ensures that current flows in the correct direction.


  Does this means that current will flow to the load, after shutdown, and return via GND multiple times, using that voltage drop to slowly drop to zero? 



In the on-state the power supply provides energy to the load and to charge the inductor. Current will flow around the red loop.
In the off-state energy is released from the inductor to power the load. Current will flow around the red loop.



  Does this solution prevent damage to the load, or the voltage source?


A successful design has to do both. The voltage is usually the critical parameter for most electrical loads. The maximum current may be a critical factor for the power supply feeding the converter.