How is Stalemate declared?

Stalemate occurs when the player who must move is not in check but has no legal moves. This situation happens most frequently when the player has just the King left on the board and any move would place them in check.

A stalemate causes the game to end as a Draw, therefore the player who has the advantage should try to avoid it and checkmate instead, while the disadvantaged player may try to force a stalemate to avoid losing.