A transformer is a device that transfers electrical energy between two circuits through electromagnetic induction. It consists of two coils wound around an iron core. The primary coil is connected to a power source and the secondary coil is connected to a load. An alternating current in the primary coil induces a magnetic field that links to the secondary coil, inducing voltage in it. There are step-up transformers, which increase voltage, and step-down transformers, which decrease voltage. Transformers are used efficiently in the national power grid to transmit electricity over long distances at high voltages to reduce energy loss, before stepping voltages back down for safe distribution to homes.