Presumably you see that Black’s queen and knight are trained on h3, ready to deliver mate—except that White’s queen protects the mating square from c3. With no way to take the queen and nothing else it protects that you might threaten, what to do? Clutter the line from the queen to h3 with 1. …Rd3. If White plays 2. BxR, notice the result: his queen’s path to h3 is obstructed by his own piece, and Black mates with 2. …Qxh3+; 3. Kg1, Qg2#. That leaves White with the unappetizing alternative reply 2. QxR—unappetizing not only because it loses the queen to 2. …NxQ, but because if White then plays 3. BxN Black has the queen fork Qd6+, winning back a piece.
Black’s original move Rd3 attacks the queen, but the idea also would work well enough with a Black piece that had no such attacking potential. Imagine no Black rook on d8 but a Black knight on c5; moving the knight to d3 then has the same effect as Rd3 in the position as illustrated. The move likewise would block the queen’s route to the mating square; the knight would have protection, so it could not simply be taken by the queen; and the queen again would have no way to jump to a safe square from which it still can protect h3. Indeed, it would work even better because it would entail sacrificing only a knight rather than a rook. Of course the nice feature of Rd3 is that it gains a tempo as White has to fret about saving his queen; moving a hypothetical knight from c5 to d3 would leave White with more options. It’s just that in this position he doesn’t have any good ones.
This is a common setting for the interference motif: you threaten to mate by dropping a queen with protection onto the rank in front of your opponent’s king (usually the second rank, but here the third); but your opponent he has a queen on his second rank guarding the square you need. Your job is to obstruct the line running between his queen and the mating square. Let’s look at a few more examples and variations.