Capacitors come in two main types: electrolytics and non-electrolytics.
There are not ideal elements, less to say, and intrinsically present Equivalent Series Resistance (the famous ESR), current leakage, dielectric absorption and, as usual with real stuff, non-linearity.
ESR is the main characteristics to consider. To me, it measures the deviation from pure capacitance as a series resistance. The value is expressed in Ohms or in tan delta (delta is the phase angle between voltage and current). The lesser the ESR is, the better. I’ll come back later about this one.
Current leakage is not a big concern with non-electrolytics but should be considered with electrolytics as a high value resistance across the capacitor terminals with generates this leakage when DC voltage is applied.
Dielectric absorption is very intuitive : it’s a kind of memory effect due to the dielectric intrinsic property. It’s not a big concern with non-electrolytics if they build with polystyrene or polypropylene dielectrics. The phenomenon is more important with electrolytics but as it’s not a source of non-linearity, it’s not a big concern too, to my opinion.
Non-linearity is a major issue because it impacts distorsion with levels from 0.001% up to 0.01%. Polyester capacitors are especially non-linear. It should not be a concern for (de)coupling or power supply filtering capacitors but it’s a real issue for RC-like filtering blocks (always think about RIAA tricky design…). My rule of thumb : try to avoid electrolytics in any frequency-sensible circuit, op-amp feedback loop or filtering block.
If you have to use electrolytics, be aware that the distorsion is linked to the voltage across the capacitor. So the higher capacitance value, the better is the linearity. If you need to use a 22uF for coupling or DC blocking, just put a 220uF.
Nevertheless, some non-electrolytics may have distorsion worse than a regular op-amp. So you’d better take time to select the best of them.
For capacitance values smaller than 1 nF, just select C0G (NP0) capacitors from a well-known manufacturer. It should work fine.
For capacitance values from 1nF to 1uF, dielectric selection is the key to get the best linearity. Polyester capacitors, cheap and most common, are not very good in terms of linearity and distorsion. Try to avoid them in RC filtering and prefer polystyrene capacitors with 1% tolerance. They are a little bit more costly but provides a decade less of distorsion in comparison to polyester capacitors. You can also achieve nice distortion figures with polypropylene capacitors though size may be a concern if you lack space on your PCB.