I was playing poker, and went all-in on the flop. I got called by multiple players, but those players had more chips than I did. I exposed my cards at the river before the final round of betting. What's the rule for a situation like that? I'm already all-in, but I exposed my cards so everyone can see. Do I automatically lose the hand because of that, or am I still in the game?
Exposing cards with action pending may result in a penalty but not a dead hand. Any penalty begins at the end of the hand.
This is the current TDA rule which applies if your card-room follows the TDA rules for tournaments.
The same rules may not apply if it's a cash-game. Individual house-rules can vary. Ask to see the rules that the card-room/casino follows and call the floor when in doubt.
In the past exposed hands were deemed to be dead in many places, but it's not the case anymore, generally. However It's up to your card-room.
If you show your hand you may simply not take a aggressive action for the remainder of the hand and you may receive a warning or a penalty.