Electromagnetic induction circuit
Inductors resist changes in current. To change the current in an inductor, you must apply a voltage. If you remove the voltage, the inductor will make its own voltage so that the current can keep flowing. Of course, making this voltage requires energy, and as that energy moves out of the inductor and into something else, the current will eventually reach zero, when there's no energy left in the inductor.

So, when the switch is closed for a while, there is a current in the inductor. When you open the switch, that current must keep going. Where can it go in this circuit, if its prevented from going through the battery by the open switch?

 

A diode allows current to flow only in one direction. It's no mistake that their schematic symbol looks like an arrow. If the switch is opened, there is only one place for the same current to keep flowing, and that's through LED1 and LED2. It will keep flowing here, even without help from the battery, until all the stored energy in the inductor has been transferred to the LEDs.