A transformer is an electrical device which changes or transforms an alternating current (AC) signal from
one level to another. The device typically consists of two sets of insulated wire, coiled around a common iron core. Electrical power is applied to one of these coils, called the primary coil, and is then magnetically transferred to the other coil, called the secondary. This magnetic coupling of electrical power occurs without any direct electrical contact, and allows transformers to change AC voltage level and to completely isolate two electrical circuits from one another.
When a voltage is applied to a coil of wire, an electrical current flows (just as water flows through a pipe when pressure is applied.) The flowing electrical current, however, creates a magnetic field about the coil. This principle can be demonstrated by simply wrapping insulated wire around a nail, and attaching a battery to the ends of that wire. A sufficient number of loops and ample electrical power will enable this electromagnet to lift small metal objects, just as an ordinary magnet can. If, however, the battery is replaced by a varying power source such as AC, the magnetic field also varies. This changing magnetic field is essential for the operation of a transformer.
Because the two coils of a transformer are very close to each other, an electric current through the primary coil generates a magnetic field which is also around the secondary coil. When this magnetic field varies with time (as it does when AC is applied), it teams-up with the secondary coil to form a type of generator. (Recall that a generator produces electrical power by moving coils of wire through a stationary magnetic field, the converse of the transformer situation.) At any rate, electrical power in the primary coil is converted into a magnetic field which then generates electrical power in the secondary coil. The beauty of a transformer is that, although the power is neither increased nor decreased in this transfer (except for minor losses), the voltage level can be changed through the conversion. The ratio of the voltages between the two coils is equal to the ratio of number of loops in the two coils. Changing the number of windings allows a transformer to step-up or step-down voltages easily. This is extremely useful as the voltage level is converted many times between a power station, through transmission lines, into a home, and then into a household appliance.