This is a self-inductance demonstration. When the switch is closed, the first led flashes briefly because the coil obstructs the initial flow Of electricity. When the switch is opened, the second led flashes as the collapsing magnetic field induced by the coil releases another short burst Of current.