You have to calculate the probability of villain not hitting one of his outs on each of the 5 cards that are to come and then multiply all of those probabilities together. I'll use AA vs TT as an example:
If you have AA and villain has TT, there are 48 unknown cards. The first card on the flop then has 46/48 chance of not being a T, the second card a 45/47 chance, the third card a 44/46 chance, the fourth card a 43/45 chance, and finally the fifth card a 42/44 chance. So to find the combined chance you multiply all of those together: (46/48)(45/47)(44/46)(43/45)(42/44) = 80% chance that villain does NOT hit a T. Therefore, there is a 20% chance that he DOES hit a T. The actual preflop odds varies slightly due to things like the possibility of an A and a T coming by the river, or neither coming but villain making a straight with his T etc.
__________________
