If your opponent has run out of time (chess clock reads zero), and you have not run out of time, then using the flag command will claim a win for you. If both players are out of time, then the game will be a draw.
If your opponent appears to have lost contact or hasn't responded in a reasonable amount of time, he/she probably has a systems lag. Use the command courtesyabort to end the game like a good sport and not have them lose the game because of a slow connection.
NOTE: some users have interface programs that automatically flag you when you have run out of time. This practice is legal. If you find yourself losing many games from being flagged when you have system lags or take longer to think about moves, then consider using longer time controls.
See also: abort, draw