How does a cell phone charger work?
Phone chargers are incorrectly named. Most are 5 V power supplies. The charge control is done inside the phone. The power supply will continue to give out 5 V when the phone is completely charged.



Figure 1. Switched-mode power-supply block diagram.

How it works:


The mains voltage is rectified to provide a high voltage DC supply.
A transistor "chopper" switches this on and off at high frequency.
A small transformer steps this down to a low-voltage high-frequency AC.
A rectifier converts this to low-voltage DC.
The chopper controller feeds back to the chopper and adjusts the chopping cycle to maintain the required voltage on the output - usually 5 V.




Figure 2. Anatomy of an SMPS 'charger'. Image source: Analogic Tips.


Plug pins.
Four diodes for the bridge rectifier.
Smoothing capacitor for high-voltage DC.
Switching transistor.
Switching transformer.
5 V supply indication LED.
Output rectifier and filter.
Opto-isolator for feedback from the output to the chopper controller.