It is not strictly against the rules to show your cards to people at your table who have folded, or to spectators, but it is generally discouraged as it opens up the possibility of collusion where the person being shown a poor hand might react as though it were a strong one, or vice versa.
If someone shows their hand to another player, then the 'show one, show all' rule should be followed.
If you fold what seems to be a terrible hand but the flop means you would have had a winner, try to keep this to yourself to avoid giving players information about cards that might still be in the deck or that you have just folded.
It can be tempting to speculate about what the winning hand might be, or to comment on the strength or weakness of a bet, but unless you still have live cards in play, you should not discuss the hand.
Slow games of poker can frustrating, and it's no fun if someone frequently needs to be reminded what the blinds are, or what the last raise was, or when it's their turn to act.