How does the transformer work?

The operation of the transformer is based on the principle of electromagnetic induction. When an electric current passes through a coil (the "primary") of a transformer, it produces a magnetic field around the coil. This magnetic field, in turn, induces an electric current in another coil (the "secondary") wound around the same core as the primary.

The ratio between the number of windings of the primary and the secondary determines the "transformation" of the voltage and current. If the number of windings of the primary is greater than that of the secondary, the voltage in the secondary circuit will be lower than in the primary circuit, but the current will be higher. Conversely, if the number of windings of the secondary is greater than that of the primary, the voltage of the secondary circuit will be higher than that of the primary circuit, but the current will be lower.