What frequencies do capacitors filter?
A capacitor's impedance is frequency dependent.
\$Z_c = \frac {1}{j \omega C}  \$
Capacitor impedance is inversely proportional to C.
If you look at a datasheet, you might see something like this (sometimes you have to dig through the manufacturers website)

If you look at the 100nF curve, you can see that as frequency increases, its impedance decreases. Fantastic. But wait... It's rising again at 20-30Mhz. That's what we would expect from an inductor.
Well..

A real capacitor can be modeled as a series capacitor, resistor and inductor. That rise that you see at that frequency means that the parasitic inductance is now the dominant term.
If you have a capacitor strapped across your rails, if you get any high frequency noise in there, the capacitor will look like a pretty good path to ground since its impedance is so low relative to the load. Different capacitors can handle different frequency ranges but typically low value caps decouple/filter high frequency (eg 1nF curve above) and higher value caps decouple/filter lower frequencies (eg 100nF curve)