to assess your opponents' range of hand. several factors must be taken into account. to start you need to analyze their styles and level of play as well as their bet frequencies.
three examples to simplify. A tight player raises before the flop first, what hands can he have? Well, it is very tight and it raises in the most perilous position. He has at least As-Valet or a very good pair, at least a pair of 10.
Large player raises before button flop.
Evaluating your hand is very complicated here. A wide player with the advantage of position can potentially raise any hand. While in the previous example we had a clear idea of the opponent's hand panel, here we cannot be as confident. His hand range is at least any Ace, any swapped cards, any connectors, any pair, any king, and much more.
You raise and a tight, passive player raises you preflop.
It is tight, passive, fearful and yet it raises your raise before the flop. You announced a big hand but that didn't stop this shy player from raising you again. He certainly has a big pair on hand as a pair of checkers or better. He will sometimes have AK even if it is a hand more complicated to play and more dangerous than a big pair.
I hope I have been clear enough on the method to be used to define the range of hand of your adversaries. because in poker, you can't just play these cards. you must also play those of your opponent to assign him a range of probable hands in order to optimize the situation in which you find yourself.