From reps in reserve. If you stopped when you could have done two more, that is an RIR of 2.
An RIR of 0 is failure: you had none left.
What it is for
So that two sessions with the same weight do not look the same when they were not. A hundred kilos at RIR 3 and a hundred kilos at RIR 0 are two very different days.