What is this stalemate thing I keep getting when I should actually win?

So you were completely crushing your opponent, he only had his King left and maybe a pawn or two, and you thought the victory was yours.

And suddenly, out of nowhere, the app tells you that it is a "stalemate" and that you have NOT won. It is a draw (tie)!!!

What is it? A trick to cheat?

No. It's just that the side to move has no legal move. And the very important point is that IT IS NOT IN CHECK either: your opponent's King is not attacked, you cannot capture it with the next move.

Here is an example (white to move):

Stalemate example

It is called a stalemate, and unfortunately for you the game is really a draw (tie). You did not checkmate your opponent, and it could not make any move. You win the game only if you checkmate.

Blocking your opponent so it cannot move is not winning.

These are the official rules of chess. These rules have been in effect for centuries and they make sense.

The stalemate offers a very small opportunity for a player who is losing to snatch out a draw. The winning side must be extremely careful to always leave at least one possible move to its opponent. So even when you are desperately losing (or winning), the game is not over until checkmate. That's one of the beauties of chess.