Note that each diode shunts the other's reverse voltage. Neither diode is permitted to have more reverse drop across it than that which is established by the forward drop of the other. This kind of circuit basically shows a symmetric voltage drop in either polarity.
Back-to-back diodes are used (for instance in op-amp feedback) to create symmetric clipping (before the signal swings to the power rails). The clipping can be softened with resistors.
In your circuit, when the switch is in the battery position, and the capacitor is initially empty, the capacitor initially looks like a short. This is when the most current flows. The conducting diode is protected by the 100 ohm resistor, and the reverse diode is off. As the capacitor fills, the current dwindles down to zero. When the switch is flipped to the ground position, the capacitor empties. This time the other diode conducts and the first diode is off. Initially, the same current flows which flowed during the other diode at the start of charging. The current eventually dwindles to zero.
The resistor protects the diode stack by dropping most of the voltage, and this works in either direction.
To notate a polar capacitor in CircuitLab, right click on the part, click Edit Parameters, and then use the combo box next to the DISP: field to choose polar.