With a rook pawn or a bishop pawn on the seventh, the side with the pawn can often draw against a queen. The queen's usual method forces your king in front of the pawn to win a move, but here that runs into stalemate. With a rook pawn, your king in the corner in front of it has no moves, so White has to let it out. With a bishop pawn, go to the corner instead of defending the pawn: if White takes it, you are stalemated.
Every move is checked with an endgame tablebase, which knows the exact result of every position with up to seven pieces. The computer defends perfectly, and if a move throws the result away, the trainer stops and shows you a better one.