Electrical impedance is a measure of the opposition that a circuit presents to the flow of alternating current, encompassing both resistance and reactance. It is a complex quantity represented as a combination of real and imaginary components, where the real part is resistance and the imaginary part is reactance, affecting both the amplitude and phase of the current and voltage in the circuit.