As others have noted, the common cause of failure for capacitors is an over-voltage condition. A capacitor in its simplest form is made with two parallel plates. However, these capacitors do not tend to "explode" but rather, they will just smoke when the dielectric is shorted through and then opened with high current.
Consequently, what would cause a capacitor to fail?
At higher temperature and higher voltage, the capacitors will fail more quickly. The temperature can be influenced by dust and debris (insulating the capacitor) in the compressor unit. Electrolytic capacitors are more sensitive to temperature and have a propensity to expand, causing premature failure.
What causes the capacitor to burn out?
Spikes in excess of the capacitor voltage rating can cause damage to the insulating dielectric layer of the capacitor leading to internal shorts. This generates heat that can dry out the internal electrolytic materials in the capacitor which causes a decrease in the capacitance.