You were playing a game and he a winning position, but lost on time when the opponent didn’t have enough material to checkmate you. In many cases, this situation would lead to a draw, but there are some notable exceptions. The main one — if there is any chance at all that you could be checkmated, you will lose the game on time.
In some positions, even you your opponent does not sufficient material, you still might have a piece on the board that might theoretically be used to trap and checkmate your king, making the position theoretically possible for checkmate.
Let’s look at the rules about insufficient material:
The FIDE chess rules describe that "The game is draw when a position is reached from which a checkmate cannot occur by any possible series of legal moves" (FIDE rule 9.6).
Here are basic set ups that will force a draw by insufficient material.
Most basic first - this rule is the reason that King vs King is an immediate draw. Neither side has a piece to check with or checkmate with.
Playing against a bare king, a bishop or a knight is insufficient to checkmate with, and therefore K+B v K and K+N v K is always a dead position. Most online playing sites end there, and consider everything else winnable.
K+Q v K, K+R v K, K+B+B v K, K+B+N v K are all endings in which white can even forcemate (see an overview of basic checkmates on Wikipedia).
Why did I lose on time if my opponent had insufficient material and could not checkmate me?
Sometimes, you have a piece on the board that can lead, in a very rare case, to checkmate. Therefore, the position is still theoretically playable and if you ran out of time, you lose.