Use what you have learned from what appears on the Board to figure out what other players are likely to hold. This too can be done when you are not in a hand. And don't worry about being very accurate. Just go through the thought process to put players on a range of hands.
Often this is done through the process of elimination-by starting with a broad range of hands and then narrowing it down based on the factors you have observed during the play of the hand. Here's an example.
A solid player raises the $5 Big Blind to $20 pre-flop from early position. He gets a couple of callers, the first one timid, and the second one clueless. You broadly consider that since he is a solid player in early position that he is unlikely to have anything but a very strong hand - probably a medium or high pair or two very big cards like A-K or A-Q.
The flop is A J 6. The solid player checks. The first of the other two players, who is generally timid, checks. The third player, who is clueless, bets $20. The first player calls. You think that he must be concerned that his opponent has a pair of Aces. The only hands that he would call with would be Kings or Queens or maybe a flush draw - but since you didn't put him on a flush draw pre-flop (realizing that his raise meant he probably had a very strong hand) you discount that possibility.
The Turn is the 9. The solid player checks. The clueless player checks. You figure that the solid player is more likely to have that high pair.
The River is the 2. The solid player bets $50. The clueless player thinks a long time and then calls. Sure enough, the solid player had a pair of Queens and the clueless player had a J 3.
You may not always get it right, but the process of thinking through what other players have by remembering both the type of player they are and their prior betting action will help you get better in the long run. It will help you figure out what your opponents are likely to have when you're in a hand - helping you decide on what the appropriate betting action is. This is especially important in no limit hold'em, because you can put your entire bankroll into action in one bet.