Why does my capacitor explode in this circuit simulator?
Are you observing an actual capacitor exploding, or just a simulation?

The message appearing on your picture says "capacitor is inversely polarized with -1.99nV", that is to say, a near-infinitesimal amount of electricity is going across it in the wrong direction. Substantial amounts of reverse voltage on an electrolytic capacitor can damage it, but I'm fairly certain it won't notice 2 nanovolts. The simulator is being, let's say, overly concerned. If you like, you can put a diode in series with the cap to protect it from reverse voltage in the simulator, but the real thing shouldn't need it.