A transformer is an electrical device that changes the voltage and current levels of alternating current (AC) electricity through electromagnetic induction. It consists of two or more coils of wire, known as primary and secondary windings, wrapped around a common magnetic core. When an alternating current passes through the primary winding, it establishes a fluctuating magnetic field within the core. This changing magnetic field then induces a voltage in the secondary winding, allowing the power to be stepped up (increasing voltage) or stepped down (decreasing voltage). The ratio of the voltages and the number of turns in the windings determines the transformation ratio, making transformers fundamental components in power transmission and distribution systems.