Understanding reference application of LM3404
The LM3404 is a switch mode current regulator, similar to a buck voltage regulator.  The purpose of L1 is to store energy during each switching cycle and the purpose of D1 is to "catch" the inductor current when the switch is off.

When the switch turns on the inductor is connected to Vin and the current in the inductor starts to ramp up.  That current flows through the LED and the current sense resistor.  When the current reaches the appropriate value the switch turns off and the inductor current starts to ramp down.  At that time the inductor current flows in the Schottky diode and through the LED.  The Schottky has a low voltage drop and therefore improves the efficiency.  

The current sense resistor Rsns provides feedback so that the part can modify the duty cycle to maintain the programmed current.