The showdown happens:
After everyone has folded and only one person is left after the river
When the betting after the river is finished, and more than one person is still competeing for the pot
In the round of betting before the flop
In the round of betting after the flop