Mini flashlight working principle
Why there is a inductor in there? 


Because 1.5 V isn't enough to light an LED. A white LED will typically require > 3 V to light it. The circuit board contains a "boost" converter consisting of a chip and additional components including the inductor. The chip pulses a current into the inductor to charge up the magnetic core. The chip then switches off the current abruptly causing the voltage to rise on the inductor. The components will have been chosen to give the required voltage and current to the LED.


  What allows it to have three modes (on, off, strobe)? 


The chip will be hardware configured to do this. (It's programmed during the design so it's not software or firmware - it can only do that function.)


  What voltage does LED take? Because I tried applying battery to it and it didn't light up.


The white LEDs take > 3 V typically. Try two AA batteries in series but LEDs are very sensitive to over-current. Just give it a short test.