Have you noticed that you can plug a school power pack into an a.c. socket but out of the black/red terminals at the front you can get a d.c. output?
How is this?
Diodes only allow current to flow in one direction.
(Same direction as the arrowhead on the symbol).
This is called half wave rectification.
An arrangement like this...
...will always produce a current flowing through R in the same direction (left to right).
This is called full wave rectification. However, it's still a long way from a smooth d.c.
So, put a capacitor across the resistor and when the supply voltage across the resistor drops towards zero the capacitor delivers some extra current through the resistor in the correct direction. This is called 'smoothing'.