To defeat an average player, it's often enough to make a couple of strong moves, and it's game over. I guess it comes as no surprise that defeating a grandmaster is much harder.
Perhaps you have a friend who always miraculously manages to survive lost positions? Some believe this is pure luck, but in fact, it's a sign of skill. I don't think it has anything to do with being lucky.
If your position is much worse, but there is no obvious breakthough, it's often a good idea to avoid creating further weaknesses. It's a common mistake to start pushing pawns to create counterplay when you are worse off, but I suggest you slowly try to improve your pieces while parrying the worst threats.
Choices are difficult
You might not see the point of giving your opponent a problem when there is only a 10% chance of failing. However, if you manage to give your opponent a series of such issues, it becomes likely that he or she will fail. This way you can equalize a difficult situation or even turn the tables.
Time to be desperate
When your position is dead lost, and you feel you're bound to lose, it might be a perfect moment to be a bit desperate. You have nothing left to lose, and you are free to make crazy-looking moves to confuse your opponent.
Once I was down a knight for no compensation. If my opponent would have managed to exchange pieces to reach an endgame, I might as well have resigned. However, I chose a radical solution: I ran forwards with the king, even if I was in great danger of being mated. It succeeded perfectly since instead of going for the endgame, he started to sacrifice pawns to mate. As you might have guessed, my opponent failed to deliver mate, and after all his sacrifices I was the one to win the endgame.
Do you want to improve your defensive skills? Check out the lesson called 'Danger - Time to Defend' in Magnus Trainer.
Here is how Magnus Carlsen survived a precarious situation against Hikaru Nakamura.
Exploiting an advantage
Hikaru Nakamura - Magnus Carlsen Zurich 2014