In an inductor, the energy is stored in the magnetic field
when there is current through the coil. A current creates an induced
magnetic field along the axis of a coil, and you may remember from
E&M that energy is stored in a magnetic field according to
, where the integral is over
space. When the current is maximum, the stored energy in the coil is maximum.
Energy is released from the inductor as the current through it decreases. Where exactly the energy goes depends on the rest of the circuit. The energy might be dissipated in a resistor, or stored in the electric field of a capacitor.
(Even if the inductor is not a coil-- remember, everything has self-inductance-- energy is stored in the magnetic field induced by the current through the inductor.)