the short answer
RIR stands for reps in reserve - the number of reps you could still complete with good form at the moment you end a set. A set taken to 2 RIR means you stopped with two clean reps left in the tank; 0 RIR means you went to true failure. Coaches use RIR to prescribe effort precisely, so you train hard enough to grow without grinding every set to its limit.
This article is general training education, not medical advice. If you are new to lifting or returning from injury, work within your ability and consult a qualified professional before pushing close to failure.