We've discussed some of the elements of a power supply, starting with the diodes that convert the AC to DC. I have mentioned the results of passing AC power from your wall socket through a series of these one-way gates is still AC, just separated AC. We don't yet have DC. Smoothing out the transitions that occur 50 or 60 times a second is the job of the storage banks called capacitors. One element in the chain I left out is the transformer, and I left it out to make a point. We don't need a transformer to change AC to DC. Transformers are useful for other duties, which I will explain, now that we are experts in how to channel that AC into separate plus and minus directions.
Transformers are miracles. Their principals of operation go back to two of my heroes: Michael Faraday and Nicola Tesla. Faraday discovered that electricity traveling through a wire creates a magnetic field. He also noticed the opposite happens. A magnetic field in close proximity to a wire creates electricity in the wire. This is all fascinating stuff, but when Tesla used these discoveries to create a new type of interface, called a transformer, he changed much of the world. The device he invented is really nothing more than two coils of wire and some iron. The first coil of wire connects directly to your wall socket: one end of the coil in one part of the plug, the other in what's left. 50 or 60 times a second the power from your wall socket flows through the wire generating a large magnetic field. The second coil of wire sits close by the first and 'transforms' this magnetic field back again to electricity.
Why does any of this matter and what does this transformer accomplish? Two things: isolation and proper voltage. You learned early on in life not to stick your finger into the wall socket for fear of shock. By coupling your equipment to the wall through a magnetic field, you've managed to isolate yourself from directly connecting to the home's AC power. Secondly, most electronics cannot use 120 or 230 volts to operate. Source equipment generally needs no more than 30 volts. The transformer gives us whatever we wish. We control how much comes out of it by the number of turns in the second coil of wire, relative to the first (fewer turns, lower voltage).
So to sum up. The transformer is the first thing our equipment uses to connect itself to your home's AC power. What goes into the transformer (AC) is the same as what comes out of it. Next it is converted to separated AC (plus and minus) then smoothed out by the capacitors into DC. We now are ready to take our DC and do something with it.