For all the circuits lumped elements in which time varying voltages / current exists , we find a relation in which the voltage is proportional to Current . The proportional quantity is in general a complex number and this is called Impedance.
It is a function of frequency of ‘w’ strictly speaking impedance is sum of its real and imaginary parts.
Z= R+ IX
Impedance is equivalent to a Resistance in series with pure imaginary Impedance - called a Reactance.
The voltage drop across the resistance is in phase with the current , while the voltage drop across the purely Reactive part is out of phase with the current.
The average energy loss in an impedance Z= R + iX depends only on real part of ‘Z’ and not on complex part.
There is no energy loss in Reactive part.