the short answer
RIR (reps in reserve) is the number of reps you could still complete with good form when you end a set: stop a set of 8 with two clean reps left and you trained at 2 RIR, while 0 RIR means true failure. Coaches use RIR to prescribe effort precisely, so you train hard enough to grow without grinding every set to its limit.
On this page: the RIR to RPE table, a worked 3 x 8 @ RIR 2 example and how to write RIR targets for online clients.
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.