Sometimes a skewer is nowhere in sight at the start of a position; you have to see that it will emerge during a sequence you can force. Here White is behind in material and has no checks that lead anywhere. But he sees a weakness in Black’s position: the rook trapped in the corner. The natural thought is to attack it and see what would happen, so White imagines Qd5. The rook can’t move, so Black has to interpose his knight with Nc6. Now imagine the board with those changes and notice their consequences: the knight has left behind just a king and rook on Black’s back rank, and White’s queen has moved into position to drop safely to g8. These are the makings of a skewer, as would be obvious if that resulting position were set in front of you in the first instance. After White’s 2. Qg8+, Black has to move his king to e7 and lose the rook.
The lesson is to be alert to whether any sequence you can force might clear lines between the enemy king and other enemy pieces, setting the stage for an unexpected skewer or pin.