A transformer and its close relative, the Induction coil, use a B field created by a Primary Coil to induce a current in a Secondary coil through induction. The B field changes as the Primary Current changes.
Read this post on techdias.com