what is impedence and where it is used and why?
Impedance is the generalization of the concept of resistance from DC to AC. That is, it's a way to represent how much current will flow with a specified (AC) voltage across the impedance. That is, if you have one volt AC across an impedance that lets one ampere of AC current flow, the impedance is defined by the AC version of Ohm's law and is one ohm.
Since AC has not only amplitude, like DC, but also frequency and phase, this introduces the possibility that an impedance will not only allow a current to flow, but will change the phase of the signal, and respond with different amplitudes and phases as frequency changes. You can have a resistor, a capacitor, and an inductor that each have an impedance of one ohm (or a Kohm or a Mohm) at any given frequency.