Transformers work by creating a changing magnetic field, which is only possible with AC. AC constantly changes direction, which causes the magnetic field in the transformer’s core to fluctuate. This changing field induces a current in the secondary coil, allowing the transformer to change (step up or step down) the voltage.