Ken Shirriff disassembles a MacBook power adapter for science and our edification. He also tears down a cheap third-party adapter and demonstrates why you should never buy one.
If nothing else Ken’s posting is a terrific introduction to how switching power supplies work, and Ken calls-out Apple’s pioneering work in this regard back in the days of the Apple ][.
The most interesting take-home fact: The charger has a couple of high-powered semiconductors that require heatsinks to keep cool. One of these is roughly as powerful as the 68000 CPU from the original Mac 128K
You might wonder why the Apple charger has all this complexity. Other laptop chargers simply provide 16 volts and when you plug it in, the computer uses the power. The main reason is for safety, to ensure that power isn’t flowing until the connector is firmly attached to the laptop.