In poker, the term villain is usually found in hand histories and descriptions. It is used to point out the main opponent in the hand, i.e., the player against whom the protagonist of the hand (the hero) played.
For example, you could see someone asking for advice on a poker forum, saying: The hero raises to $20, the dealer calls, and the villain 3-bets from the big blind, making it $130. What would you do?
It’s important to note that the term villain doesn’t have any negative connotation, nor does it reflect the player’s skill level. It is simply used to clearly show who the hero’s main opponent in the poker hand is, making the analysis easier.