Capacitors and inductors are both energy storage elements. Since energy cannot be changed instantaneously, circuits with energy storage elements will respond in a dynamic way to time-varying currents and voltages.