If you have a huge disadvantage at a low level, you should play on, as there is a good chance that the opponent blunders. However at a higher level you should just resign, as there is basically no point in continuing, but if its not too bad you can still win