The thought process is identical: White examines his knight’s moves, or perhaps does a color scan and notices that his knight and Black’s king and queen all are on dark squares; one way or another there is a potential fork in Nd7+. The hindrance is that the bishop at c8 protects the needed square. Can White capture the bishop? Yes, with his queen—a sacrifice worth making for the fork that follows. So: 1. QxB, RxQ; 2. Nd7+, and after White takes Black’s queen he has gained a bishop for his trouble.