Capacitor stores an electric field, while an inductor stores a magnetic field. A capacitor is an open circuit for DC, and the inductor is a short circuit for DC. In AC, for a capacitor, voltage lags current, while for inductor, the current lags voltage. Energy stored in the capacitor is analyzed in terms of current for the inductor.
Capacitor and inductor are the electrical components utilized in circuit design. Both belong to the passive parts category, which attracts energy from the circuit, store, and then releases. A capacitor is comprised of two conductors that are separated by an insulating dielectric. When a potential difference is eliminated, and two conductors are connected, a current flow nullifies potential difference and electric field.
The frequency of discharge becomes reduced with time and is known as the capacitor discharging curve. The inductor is simply a coil, and it stores energy as a magnetic field when an electric current is moving through it.