The capacitor works as the backup power generation in our house or as an emergency power system, so when the switch its open, the the flow of current flows from the capacitor instead of the power supply. The circuit will still running because the capacitor store enough energy to pass the current to the circuit for limited time.
All of this circuit is create by Jenko022 on via youtube