The ESR parameter is actually affected by several factors, including the electrodes and terminal leads, as well as the dielectric, board material, and electrolyte solution, all of which are frequency-dependent. If you look at it from the perspective of actual series resistance, leakage resistance, and dielectric losses, ESR changes from just a resistor in series with an ideal capacitor to a more complex component, as shown in Figure 1. Note that real capacitors also have a complementary parasitic self-inductance, called equivalent series inductance or ESL, but this is another story for another time.
Figure 1: The theoretical capacitor is a simple reactive component, but real capacitors have equivalent series resistance due to ohmic series resistance, leakage resistance, and dielectric losses. (Image courtesy of QuadTech)
Why should we worry about ESR? For basic DC circuits, ESR may not matter much. However, when you are designing switching power supplies or RF circuits, ESR will obviously affect your design and the actual performance of the circuit. ESR changes and reduces the resonance of the circuit in which the capacitor operates and the quality factor Q of the circuit. ESR is frequency dependent and is obviously affected by many factors, including capacitor type, material, construction and capacitance value, as shown in Figure 2.
Figure 2: ESR is affected by many factors, including operating frequency and capacitor material and type (Image courtesy of Murata).
ESR does more than just affect circuit performance. As a "resistance", it also generates heat power dissipation, P, which is a function of the current flowing through the capacitor, expressed as P = I2RS. Not only does ESR waste power (which is determined by the power consumption and operating time in most cases), but this power dissipation increases the thermal load of the system. Even if it does not burden the system, it can quickly exceed the thermal rating of the capacitor itself. For example, a basic 0.47μF capacitor has an average ESR of about 0.1Ω at 1GHz, and dissipates about 75mW. Depending on the specifics of the circuit and system, and the capacitor ratings, this power dissipation may not be significant, or it may be significant.