In the unusual situation that all players with an interest in a pot fold their cards during a showdown, the pot should be awarded to the player closest to the button, or the player who should have shown first, whichever applies.
In the case of side-pots, only players who have put money into the side-pot are eligible to win that side-pot. If all players with an interest in a side-pot fold, the side-pot should be awarded to the player closest to the button, or the player who should have shown first, whichever applies.
In a tournament, when all players are all in an no betting remains but cards are to come, the players must table their cards before the dealer proceeds to deal the next round of cards. The winner should always show their hole cards in a tournament.
In a cash game, in the situation where all opponents fold their hole cards face down during showdown, and there is only one remain player, the last remaining player does not have to show their hand, because the hand is over as they have no remaining opponents. In some casinos, a player may request to see the winning hand, however, in no case should the losing player who mucked first [and thus did not show their hole cards], be allowed to request to see the hand. This is the reason in some casinos only active players in the showdown may request to see hands that are being mucked face down. Some casinos allow any player at the table to request to see face down mucks.
In home games, the rules may be different. In some home games you can carry a pot from one hand into the next hand. This never happens in a casino.