Usually your opponent's queen makes a poor target for a queen fork because it can defend itself by attacking the attacker. Part of the beauty of the knight fork is that a knight, on account of its unusual pattern of movement, can attack an enemy king and queen without being subject to capture by either of them; the queen as an attacker generally does not have that advantage. The exceptions are cases where, if the attacked queen does defend itself, the result is mate—most commonly on the back rank—or else another combination.
In this first example, start by examining the Black king’s position and the constraints on its movement. It is stuck on the back rank. White can launch an attack there with his rook on the e-file; if the Black queen weren’t in the way, Re8 would be mate. “If his queen weren’t there, I could mate”—many combinations begin with a counterfactual like this, which is why imagination plays such a large role in chess. Here the point of the insight is that Black’s queen is unusually vulnerable to attack because of the crucial defensive work it is doing. It also is loose, and so is Black’s bishop, so White looks for ways to attack them at the same time. Their lines intersect at b4, so White plays 1. Qb4. If Black plays QxQ, then White ends the game with Re8. (Black can bring his queen back to f8 to block the check, but White just takes it and mates.)
We aren't quite done with the analysis. After 1. Qb4 Black will look for some other way to save his queen and avoid disaster. What will it be? Moving the queen to c8 where it seems to protect the bishop is no good, of course, since play then goes 1. Qb4, Qc8; 2. QxB, QxQ—followed, again, by 3. Re8#. Black might instead move his queen to a safe square like g8, but his best reply to Qb4 probably is Nc6. Do you see why? It opens a line from Black’s rook on a8 to his queen, so that the queen no longer is loose. Now White has a choice of 2. QxB or 2. QxQ, RxQ; d5xN. Either way he wins a piece, but the latter sequence is a little stronger because it also takes both queens off the board, magnifying the significance of the advantage White gains.