this is a very simple switching circuit used in almos cheap mobile phone charger,lets postmortem it
>circuit section left of the transformer is high voltage side where main supply 110-230v AC is feed
there is diode for half wave rectifier and resistance to reduce current and capacitor with resistance 1.5M provide the switching to transistor base
>transformer has four wire out at input side 2 of them use to feed power and rest of 2 use to connect with the zener diode arrange with resistor and capacitor to provide feedback to the switching to maintain the output dc voltage to desired 5v output
> A capacitor coupling there is for complete isolation between high voltage mains to output low dc voltage to avoid damage to device it is connected
>right side of transformer there is diode used to rectify and capacitor to filter gives 5v dc