Perhaps one of the toughest decisions in hold'em is what to do against one or two opponents on the river with top pair. Should you bet or check here? First look at the board and determine if any straights, flushes or full house draws are possible. You'll beat any two pair but fall to two pair or three-of-a-kind. It is possible for top pair to win the hand and you'll probably be in a kicker war here if there has not been significant action on the preceding rounds of betting.
Let's say you hold A-K on a board of A-J-5-2-8 and are first to act. The action has been standard throughout the hand; you leading out with your top pair, top kicker and your two opponents calling. If your opponent had hit two pair on the flop or turn, they would have raised. So, you can bet on the river here and in the unlikely event that one of your opponents made two pair on the river, they will call and you will win an extra bet.
If you are last to act on the river in this example and an opponent has bet in front of you, what should you do? You can raise with confidence against an overaggressive player here but just call a tight player who bets on the river. The key here, as it most always is, is to know your opponents. Holding top pair on the river is a common situation at the hold'em table and it's important you learn how top play it well.