Let's start at the beginning. First there was the sine wave voltage source:
simulate this circuit – Schematic created using CircuitLab
And its output voltage is displayed in the image below. Notice that the voltage swings between minus and plus 10 volts.
For ease of the discussion let's do a half wave rectification. The circuit for that looks as follows:
simulate this circuit
The diode blocks the negative half cycle and conducts during the positive half cycle. Notice that the vertical scale in the plot below changed from +/- 14V to 0-12V. The diode introduced a voltage drop of about half a volt, the peak is no longer 10V, but more like 9.5V. That's how practical diodes work and goes well beyond the discussion for this question. Accept it as a fact of life for now.
At this point we have a rectified voltage, but many (especially electronic) devices can't cope very well with that. It is continuously pulsing on and off and we rather see a more continuous voltage. That is where the capacitor comes in:
simulate this circuit
Look at a capacitor as a reservoir, as a bucket. You can fill it to the top and then slowly empty it, but as a net result there is still water in the bucket. This is very similar to what happens with the capacitor too. At the far left in the plot the capacitor is empty, but it is quickly charged by the voltage source and through the diode. The voltage source is ideal and can source as much current as required to pull the anode-voltage of the diode all the way up to 10V, no matter how much current the rest of the circuit draws. Remember that the diode will conduct only while the voltage on its anode (left) is higher than the voltage on its cathode (right). The capacitor is charged to its maximum voltage, just under 10V. Then the source voltage starts to drops and once the anode-voltage is lower than the capacitor voltage the diode stops conducting.
But the capacitor is still charged, the reservoir is still almost full and it can only empty itself through the load (RL). The load however takes much less current than the voltage source can deliver and therefore the capacitor will discharge much slower than it was charged. The result is a DC voltage, but now with a ripple. The rate of discharge depends on the load and the capacitor. Higher resistor value (ohm's) means slower discharge and the ripple getting smaller. With an infinitely high resistor as load the output voltage will just stick at 10V. Similar for the capacitor, if you increase the capacitor value, the ripple voltage will decrease.
In this example, the DC voltage is approximately 7.5V and the ripple is about 2V peak to peak.