When a system contains two or more pieces of equipment that are grounded, whether via power cords or other ground connections, a “ground loop” will likely be formed. See Figure 1, below.
Although ground loops often involve power line safety ground connections, disabling them is both highly dangerous and illegal.
However, devices called “ground isolators” can be inserted in the signal path to break the loop safely.
This approach attacks the problem at its fundamental roots, while tampering with safety ground does not. In simple language, a ground isolator is a device that transfers a signal across an electrically insulated barrier.
This is how it stops the flow of power-line currents that would otherwise generate noise as they flow through signal cables.
Because an isolator is not a filter that recognizes and removes noise, it must be inserted in the signal path at the point where the noise coupling actually occurs.
On the other hand, a transformer can serve as an extremely effective ground isolator.
As shown in Figure 2, it transfers signal voltage from one winding to the other without an electrical connection between them.
This electrical isolation blocks the flow of ground noise current in the signal cable.

Figure 1: See the ground loop in this home theater system?
While the isolation would be total for an ideal transformer, physics imposes limitations on real-world transformers.
Two Basic Types
In practice, noise reduction depends critically on the design of the transformer. Audio transformers fall into two basic types.
The first, known as an output transformer, is by far the cheapest and easiest to build. Because its primary and secondary windings are physically interleaved, considerable capacitance is created which allows noise currents, especially at higher audio frequencies, to flow between windings.
This limits its ability to stop ground noise.

Figure 2: A transformer can serve as an extremely effective ground isolator, transferring signal voltage from one winding to the other without an electrical connection between.
The second type, known as an input transformer, is built with internal metal foil shielding between its windings.
This “Faraday shield” effectively eliminates capacitive coupling and vastly improves noise rejection.
A magnetic shield serves a completely different purpose and, if used, is on the outside of a transformer surrounding both the core and the windings.