A demodulator is a part of the chain of transmission of information.
(…)
It is located at the point of reception.
It receives, at the entry, a signal that is amplitude modulated. This is a high frequency signal.
At the exit, the demodulator delivers a useful signal of low frequency
…. which is none other than the envelope of the modulated signal.
The principle of envelope detection , with the aid of a diode and an RC circuit, is the simplest of demodulating circuits.
The diode acts as a switch.
When it is forward biased, the output voltage equals the input voltage and the capacitor takes on charge. When the diode is reverse biased, the capacitor discharges into the resistance.
(…)
The output voltage Vo decreases with a slope that depends on the time constant “RC”.
If the time constant RC is too small, the decline is too rapid, and the red curve has the time to vary between two consecutive peaks of the blue curve.
If the time constant RC is too large, the capacitor discharges too slowly and the ouput can momentarily no longer follow the peaks of the blue curve.
It is by means of a judicious choice of values for R and C that one finds the useful output signal, meaning the low frequency envelope without its high frequency carrier.