Electromagnetism is due to the magnetic fields around electric currents. The fields can cause forces with other nearby magnets which can be used to make motors spin. Transformers use electromagnetic induction to change the voltage of alternating currents.
A basic transformer is made from two coils of wire, a primary coil from the alternating current (ac) input and a secondary coil leading to the ac output. The coils are not electrically connected. Instead, they are wound around an iron core. This is easily magnetised and can carry magnetic fields from the primary coil to the secondary coil.