It's the best possible hand or a hand that cannot be beaten by any other hand in a particular situation. When a player has the nuts, they hold the strongest possible hand given the board and their hole cards in that specific moment during a hand. Having the nuts provides a significant advantage because it ensures that a player cannot be outdrawn or beaten by any other hand at that point in the game.
The board shows 2♥2♥2♥2♥2♥. The player A has 2♥2♥ and might think owning the best hand possible (full house, Jacks over aces), but the player B has 2♥2♥, a Quads of Jacks. The player B has the nuts.