I just lost an online game on time (while playing on lichess.org). I had three pawns and my opponent had just a knight. I don't understand why it's not a draw. Shouldn't it be a draw because my opponent does not have enough material to checkmate me?
Draw with insufficient material is covered in article 9.6:
The game is drawn when a position is reached from which a checkmate cannot occur by any possible series of legal moves, even with the most unskilled play.
With a given material, it is possible to construct a checkmate (assuming your cooperation or horrible blunders), so it is not a draw.
From FIDE Laws of Chess (2018 version):
6.9 Except where one of Articles 5.1.1, 5.1.2, 5.2.1, 5.2.2, 5.2.3 applies, if a player does not complete the prescribed number of moves in the allotted time, the game is lost by that player. However, the game is drawn if the position is such that the opponent cannot checkmate the player’s king by any possible series of legal moves.
(The articles in chapter 5 all concern checkmate, stalemate, resignation or agreement to draw. I.e. any conventional consideration other than time that causes the game to be over.)
So your time ran out, and your opponent can checkmate you through some legal series of moves, which means you lost.
I do not know that Lichess folows the FIDE laws, but it seems like a reasonable assumption in this case.
As others mentioned, you cannot get the draw because you can still get checkmated.
In fact I have actually seen this kind of position get lost in practice, as follows:
You are on Ka8 and have just played a7 pawn (knight, rook or even bishop have very similar effect and could be obtained via promotion), opponents king is on Kc8 or Kc7 and opponent plays Nb6#
From the lichess.org FAQ:
In the event of one player running out of time, that player will usually lose the game. However, the game is drawn if the position is such that the opponent cannot checkmate the player’s king by any possible series of legal moves (FIDE handbook §6.9).
Note that it can be possible to mate with a single knight or bishop if the opponent has pieces that could block the king.
I assume that the statement in the second paragraph is being used as the basis for ruling this as a timeout rather than a draw (and, as others have pointed out, this would be a correct call in this case.)
Perhaps it is worth noting that, in general, it is computationally infeasible to determine when a player cannot win, and furthermore, an automated system cannot yet be expected to identify all such cases that are obvious to an experienced player, so it must be expected that lichess will use tractable rules such as those quoted.
By USCF rules, you wouldn't have.King + Bishop and King + Knight are defined to be insufficient mating material unless that side can demonstrate a forced win (all forced wins are very short, so this isn't hard to do if it exists).
14E: Insufficient material to win on time:
The game is drawn even when a player exceeds the time limit if one of the following conditions exists:
14E1: Lone king
14E2: King and bishop or king and knight
The presumed rationale behind this is that avoiding checkmate from that material combination is so trivially easy that a win on time is the only realistic way to win.