Switched mode power supplies (SMPS) are now standard for most of our appliances. Old-fashioned linear power supplies based on network frequency transformers are disappearing, mainly due to their cost, their large size and weight. We are taking here about network power supplies (say 120 V or 230 V AC) with power ranging from a few watts to several hundred watts.
First, let's look at the generic block diagram of an SMPS. The power supply enters the circuits through a line filter, is rectified and softened to obtain a high voltage voltage (a few hundred volts). Some rectifiers have a switch that turns them into a voltage doubler when working with a 120 V AC grid or simply a rectifier when working with 230 V. Some others are designed to operate from 100 to 240 V AC without switches and the regulator does the rest. This high DC voltage is switched by one or more transistors (or MOSFETs) to drive the primary of a ferrite transformer. On the secondary side, the voltage is rectified and filtered. The switching transistors are driven by a control circuit which detects the output voltage (and the input current) and is regulated accordingly. This control circuit is very often on the primary side and is often driven by an extra winding in the transformer. A sample of the output voltage is returned through an optocoupler. In some cases, the control circuit is located on the secondary side and drives the transistor (s) through a small additional transformer. All configurations have some additional circuitry to allow the controller to start at power-up.