How does ac dc power supplies work?
The mains to the house is an alternating current and this high voltage is stepped down using a transformer. The low voltage secondary alternating current is converted to direct current using 4 diodes wired as a bridge rectifier. The ‘lumpy’ direct current is smoothed using an electrolytic capacitor to smooth the resulting dc. It may need to be voltage regulated if the circuits it feeds are voltage sensitive.