Help, what are the rules?

When opponents time expires, you win if and only if there is a legal sequence of moves leading to opponent being checkmated.
If you there is no legal checkmate with the pieces you have left (like only a king), it is a draw. A pawn usually (in practice always) enough since you can promote it.
Also normally drawn positions can be won: if you have king and two knights, opponent only a king, you can win on time but not force a checkmate. Or kings and opposite coloured bishops.