What's going on
A diode lets current flow one way only. A half-wave rectifier uses one diode, so it passes the positive half of each AC cycle and blocks the negative half. A bridge rectifier uses four diodes arranged so that both halves come out the same way round. In the positive half D1 and D4 conduct, and in the negative half D2 and D3 do. The current flow animation shows each pair taking its turn.
AC voltages are quoted as RMS values, and the peak is √2 times higher, so 12 V AC peaks at about 17 V. The DC output peaks at that value minus the diode drops: one diode for half-wave, two for a bridge, around 0.7 V each for silicon diodes.
Smoothing and ripple
A capacitor across the output charges up near each peak and then supplies the load until the next one. The voltage sags a little in between, and that sag is called ripple. A good estimate of the ripple, peak to peak, is:
ripple ≈ I ÷ (2 × f × C) for a bridge ripple ≈ I ÷ (f × C) for half-wave
where I is the load current and f the mains frequency. A bridge refills the capacitor twice per cycle, so it has half the ripple of a half-wave circuit with the same parts. The capacitor only charges for a short time near each peak, so the diodes and transformer carry short pulses of current several times the average load current.
When choosing parts, the diodes must block the reverse voltage: about the AC peak in a bridge, and about twice the peak in a half-wave circuit with a capacitor. The capacitor must be rated above the peak DC voltage, with some margin.
Stay safe
Only ever experiment on the low-voltage side of a properly built transformer or adaptor. Mains voltage can kill. Large smoothing capacitors can stay charged after the power is off, so discharge them safely before touching the circuit.
How this simulation works
The transformer is modelled as a perfect sine wave in series with a fixed 0.5 Ω resistance, standing in for its windings and wiring. Each conducting diode drops a constant 0.7 V, and the capacitor is ideal. The circuit is stepped through 30 mains cycles and the last ones are shown, once it has settled. Real silicon diodes drop more at high currents, and a real transformer's output voltage rises when it's lightly loaded, because its rating is given at full load. The peak diode current depends strongly on the source resistance, so treat that figure as a guide.