Take a look on the diagram above. Assume that the voltage source supplies a 1V/10kHz signal (this means: the amplitude is 1V and the frequency is 10kHz = 10000Hz).
The impedance of capacitor C will be XC = 1/(2∙π∙104∙10-6) = 15,9Ω. The output voltage (voltage across capacitor C) will be 1V∙(XC/ZR+C), where ZR+C is the total impedance of R and C. Because a capacitor causes a phase shift in the current flow, we cannot just state that ZR+C = R + XC. Using some complex math we can prove that:
ZR+C = √(R2+XC2).
In our case ZR+C = √(1k2+15.92) = 1000.13Ω. So the output voltage becomes 1V∙(15.9/1000.13) = 0.0159V.
Now assume that the voltage source supplies a 1V/10Hz signal. The impedance of capacitor C will then be XC = 1/(2∙π∙10∙10-6) = 15,9kΩ. The output voltage will be 1V∙(XC/(ZR+C)) = 1V∙(15.9k/√(1k2+15.9k2)) = 0.998V. So we created a very simple frequency filter with just a resistor and a capacitor.
In this case we created a so called low pass filter (LPF) since it passes low frequency signals and suppresses high frequency signals. If you swap R and C, you create a high pass filter (HPF).
Let's calculate the cut-off frequency of our filter. The cut-off frequency is the frequency at which R=XC => R = 1/(2∙π∙f∙C) =>
In our case f = 1/(2∙π∙103∙10-6) = 159Hz.