Transformers will only work with a changing current (AC). Transformer only works on AC and can’t be operated on DC i.e. it has been designed to be operated only and only on alternating current and voltage.
The transformer works on the principle of mutual induction, for which current in one coil must change uniformly. The idea behind a transformer is magnetic induction on one coil causing a current in the other, and you only get that when a current rises and falls, causing a rise and fall in the magnetic field too.
Transformers no not pass DC from primary to secondary coil. If dc supply is given, the current will not change due to constant supply and the transformer will not work.
If you apply DC to a transformer you will see a short spike on the secondary winding when power is applied to the primary and another short spike of energy when power is switched off in the primary.
If considerable DC current is applied continuously to a transformer coil it can get hot (can cause likely burn out) and the transformer core can saturate.
There are some applications where some DC can flow through audio transformer coil. If the DC offset is in a tube amplifier, then chances are the primary of the transformer is being used as a DC choke for the plate voltage. The DC will not pass to the secondary of the transformer.
If there’s DC across the primary = usually bad. But if it’s a split center tap and the currents are exactly equal = ok (used on sone tube amplifiers and phantom power circuits).
Generally the are limits on how much DC different transformers can take nicely. In analog telephone world those that could take normal line current nicely were called “wet” transformers and those which cannot take any considerable DC “dry”
Some old control equipment habe used a DC to saturate or partially saturate a transformer like iron core to control an AC current. This is rare.