A transformer works with **AC (Alternating Current)**. It cannot operate with **DC (Direct Current)** because transformers rely on the changing magnetic field created by AC to transfer energy between the primary and secondary coils.
With AC, the current keeps changing direction, causing a varying magnetic field that the transformer uses to induce voltage in the secondary coil. With DC, the current flows in one direction, and it doesn't create the changing magnetic field needed for a transformer to function. As a result, a transformer won't work properly with DC.