A transformer transfers energy between two circuits through electromagnetic induction. It has a primary winding connected to an alternating current source and a secondary winding connected to a load. The number of turns in each winding determines the ratio of voltages induced. If the secondary winding has more turns than the primary, it is a step-up transformer and increases the voltage. If the secondary has fewer turns, it is a step-down transformer and decreases the voltage. Transformers operate by inducing voltages in each winding through a changing magnetic field created by the primary current in the transformer's core.