Now combine the present theme with an earlier one: checks that force the enemy king and queen into line with each other. Note that White’s queen is under attack by Black’s knight. What to do about it? You can move the queen or take the knight. When you think about queen moves you start with any checks it can deliver, and here there are two: Qg6 and Qh7. White is operating with a battery of bishop and queen on the diagonal, which makes the queen secure on either square against capture by Black’s king. But it doesn't make the queen secure against capture by a pawn, as would occur if he played Qg6+. And if he plays Qh7+, the queen is taken by Black’s knight.
So now the next thought: perhaps taking the knight is the best way for White to get rid of his problems after all; and since NxN is White’s only possible capture of a piece, consideration of it is compulsory in any event. Black's first reply to examine would be h6xN. Now White takes a fresh look at any checks he would have and sees that Qh7 would be checkmate. All right; suppose Black sees this and so instead replies to NxN by recapturing with f6xN. Again take a fresh look at your checks and their consequences. This time Qh7+ isn't mate; it forces the king to f6, where it is safe—momentarily. But when you see the king move you look at the lines running through its new square, and here notice that Kf6 puts the king on the same rank as its queen. White then has the skewer Qxh6+. After Black moves his king, White takes his queen.
This position is included here because it involves clearing a pawn from between the enemy king and queen as well as moving the enemy king into line with its queen. The clearance of the pawn occurs first as a by-product of NxN, but it might have occurred after the king was nudged into position if the board were arranged a bit differently. The important point is just to see how these themes involved in creating skewers can be combined.