An overpair is a pocket pair made up of higher-valued cards than any of the pairs that could be made using the cards on the community board. In other words, it can be any pair that beats the top pair.
For example, let’s say that you have a pair of Queens. When the first three cards come on the flop, the board reads 4, 9, and J. If any player has a J, they have a top pair in the context of the cards on the community board.
But, looking at the entire setup for the game, you are holding an overpair, as your pocket Queens make the strongest pair at this point.