That really depends - I assume we're talking live here?
The answer is actually pretty similar for both live and online: you have to pay close attention to your opponents while they're in a hand. What are they doing, what kind of bets are they making, what could their range be and what kind of hands are they showing down?
Online this is restricted largely to betting patterns and sometimes the amount of time it takes a player to act. Live there are obviously physical tells. Some of them are common to most people and we can learn about through books and other resources, but a tell also has to be validated through observation before we can start relying on it for a particular player.
Long story short it's all about observation and being able to remember what different opponents did in different situations. Betting patterns are probably the easiest place to start because they're common to both live and online play and there's a lot less interpretation needed. It'd probably help to do some reading / study before moving onto physical tells / gestures / mannerisms in live games because some of them can be counterintuitive or misleading if you're new to them.
If you want to do some reading,
Read 'em and Reap by Joe Navarro is my personal favourite book on live tells. It's a whole heap better than Mike Caro's
Book of Tells.
This thread might be of interest to you too:
https://www.cardschat.com/forum/learning-poker-57/dare-i-attempt-serious-discussion-live-179184/