This one takes a little imagination. You might start by seeing the capture you have available: QxN. It doesn’t work because Black’s knight is guarded by its queen. Might you be able to chase away the queen, as with Nc5 or Nf8? No, because the queen just moves to another square from which it guards the knight (e.g., Qe8 or Qd6). But when your own knight is nearby the thought of a fork always is there, and now such a possibility comes into view: notice the position of Black’s king and knight; they are on squares that are poised to be forked. If Black’s queen were substituted for his knight, White’s knight could fork them if it could get to g6. White’s knight can’t get to g6 from its current perch, but in two steps it becomes possible. First comes Nf8, attacking Black's queen. The queen moves anyplace where it still can protect the knight; White plays the exchange 2. QxN, QxQ; and now 3. Nxg6+ imposes the fork, wins back the queen, and gains White a piece.
Another way to think here―the reader can judge its utility―is to say it's a case where the knight isn't on the right colored square at the start, so it needs to make two moves rather than one: first a move to a dark colored square, to match the one where the king sits; then, after the queen is likewise moved to a dark square, the fork from g6. But notice that this pattern (two knight moves) is likely to work only when the knight makes a threat on its first move which keeps the opponent too busy to do anything about the forthcoming fork. In this case the initial move Nf8 threatens Black's queen, so his choice of replies is very limited.