Smooth signal using a capacitor
The input AC waveform charges the capacitor when it has higher voltage than what the capacitor has so the capacitor voltage goes up from the charging current.
When AC waveform has lower amplitude than what the capacitor has, the capacitor voltage drops because the current to load discharges the capacitor.