Couple different ways to look at this.
The impedance of a INDUCTOR is JWL
w=omega...or radians per second of your input signal...such as the 377 in a wall outlet: 170sin377t volts
So clearly, as the frequency changes, so does the impedance.
What's the frequency of DC? Zero right? When you plug zero into JWL, you get zero resistance, or a "closed" circuit as you say above.
Then there is this formula:
L*di/d(t)=v(t)
In simple terms, You could say that any change in current makes a voltage across the inductor.
In DC, there is no change in current, just a flat line. No change in current, no voltage...hence your closed or short circuit once again.
Works the same but opposite for Capacitors.
Impedance is 1/(jwc)
Impedance changes with frequency again.
Again, if w=0 you will have a infinite resistance...or open circuit.
C*dv/dt=it
Again, change in voltage induces current. In DC, no change in voltage, no current, open circuit...
Also important to note that the "j" in the impedance, shifts the current out of phase with voltage. If it is purely inductive circuit, the current will shift 90 degrees with a vector pointing down. If it is purely capacitive, it will be a current vector pointing straight up. Ussually tho, there is a combination between real and imaginary current...leading to a current angle somewhere between 0 and 90 degrees. The two derivatives above will accomplish the same thing.
One more, the AC voltage in a receptacle has a frequency of 60 hz. So the current changes directions 60 times per second. So when it hits that coil of wire, an electrical field is induced, but then it changes direction inducing the field the other way...over and over. Same for the capacitor, it starts to charge in one direction, then current changes direction inducing the charge the other way...over and over.