See the loose rook on c8. See the exposed enemy king on h8. See that in one move your own queen nearly can get into position to attack both targets with Qh4. Neither part of the attack works yet; the point is just to recognize this as a common general pattern for a queen fork: the check against the exposed king down the side of the board, and the accompanying diagonal attack against a loose piece on the back rank. The question is whether it can be made effective. The pawn on h5 blocks the queen’s path on the h-file; and the fork would have to be executed from g4 anyway in order to reach the loose rook (or else the rook would have to be moved). Well, getting the pawn out of the way is no great challenge; just take what it protects with 1. RxN. After h5xR, White can work with checks and thus is in the driver’s seat: 2. Qh4+, forcing Black’s king to the g-file; then 3. Qxg4+ (the fork) and 4. QxR.
So White gets a pawn, a knight, and a rook for a rook—if Black bites by recapturing after White starts with RxN. He probably won’t, which is fine; it leaves you with a piece. But you also have to make sure that he doesn’t have any killer threats of his own to play instead, and at this point the position becomes more demanding than at first appears. Look at any checks Black can play—and not just the first check he can give, but strings of checks. You need to satisfy yourself that you can escape whatever mess he can create. Imagine him replying to RxN with Qa2+. This forces your king to c2; then comes Black’s next check, b4-b3+. This time your king escapes to d1, and Black is out of checks. He can play Qxb2, but since that’s not a check it leaves you with a move to take your rook on g4 out of the danger it still faces from the pawn on h5.
That last point is important. The purpose of looking at Black’s counterthreats is partly to make sure you aren’t leaving yourself open to a mating trap, but it’s also to make sure that Black can’t play any forcing moves (checks, mate threats, or captures) that will force you to move your queen; for remember that while all this action is going on in the near left corner of the board, your rook still has been left en prise to Black’s pawn on h5. The only thing preventing your rook from being taken is the threat of the queen fork discussed in the first paragraph. If Black can find a way to distract your queen, your rook will be a goner because Black will be able to take it without consequence. But he can’t.
There is yet one more possibility you would need to consider: Black can reply to Rxg4 with b4-b3. Again, you are looking for major counterthreats Black could launch; this counts as one of them because once the pawn has moved to b3 it is ready to support mate by the queen on a2. The pawn move also uncovers the threat of QxQ next move. Black might be thinking that this will force White to make the preemptive strike 2. QxQ; then after Black replies RxQ, the queens have been traded and Black is ready to launch a mate threat of his own with Rc8-a8, preparing Ra1#. But this needn’t scare you, for White has another move to play in the middle of that sequence. If 2. QxQ, RxQ, then White goes with 3. Rc1-h1. This pins the pawn on h5, so now White’s rook at g4 is safe; more to the point, with rooks on both the g and h-files White suddenly is ready to mate with Rxh5. Indeed, Black cannot escape that result.
This position is worth a good look as a study in anticipating your opponent's counterplay. The reason the issue needs such close consideration here is that White's king is so exposed. It's next to an open file on which Black has a queen and rook, and its only flight square (c2) is perilously close to being sealed off by Black's b-pawn. This means that White has to be very careful not to end up mated or otherwise burned by operations against his king's position. It can happen at any time—even in the middle of a tactical sequence White initiates elsewhere on the board.