You have the switching power supply controller right there, labeled U1, by the D3 diode.
In very simple explanation, the chip sends pulses of high DC voltage (ac rectified by that bridge rectifier and smoothed by a capacitor) through the transformer and the output gets converted back to DC.
The lower voltage then goes to the linear regulator to get 5v.