You don't want to overlook a potential fork just because the forking square already is occupied by one of your own pieces. Ask: can the piece that is in the way evacuate the square violently, thus requiring a time-consuming response from your opponent and making the fork possible on your next move?
In this first example White’s knight is on a light square and so are Black’s king and rook. Or just look at the knight’s potential moves without being distracted by pieces of your own that already occupy the squares the knight might like to reach. Either way the point to notice is the potential fork at f6. The trouble is that White’s own rook already is on the square. There is standard method for dealing with this: Ask whether the rook can be moved in a way that requires an immediate reply from Black, keeping his king and rook where they are. A capture is good for the purpose, and the one possible here is RxN: it calls for Black to respond b7xR, and White then follows up with Nf6+.
Keep track of what you are losing and gaining. Here you have sacrificed a rook for a knight, and are about to win a rook. But then won't you lose your knight after the fork, leaving the sequence a wash? No, though that would be true if Black could respond to the fork with Kf8, for then after NxR Black could play KxN. But here Black can’t play Kf8 because White has a pawn guarding the square. Black has to play Kh8, and then White wins the rook cleanly.
When we say that White's initial RxN "requires" or "calls for" Black to play b7xR, this should not be taken literally. If Black sees this sequence coming he will respond to RxN by forgetting about his lost knight and instead moving his king to avoid the fork at f6. This is a point common to many of our studies: you have a series of captures that lead to a smashing finale if your opponent recaptures after each of them; but of course he may not recapture, leaving you with lesser gains. In a good game of chess this often is the importance of seeing tactics. You may or may not actually get to play the fork, but seeing the threat of it allows you to make other gains.