RIR stands for "reps in reserve": how many more clean reps you could have done at the end of a set. RIR 0 means nothing was left, RIR 2 means two more would have gone.
RIR and RPE describe the same thing from two sides. RPE is the matching scale: RPE = 10 minus RIR. A set at RIR 2 is therefore RPE 8.
Which RIR for muscle growth
For most working sets, 1 to 3 RIR is common. A set with no more than 3 RIR counts as a hard set and goes toward your training volume. You do not need to go to failure for that: a meta-analysis by Refalo et al. 2023 found no evidence that training to momentary muscular failure builds more muscle than stopping just short of it. On heavy compound lifts, failure mainly costs recovery, while on isolation exercises the occasional RIR 0 is fine.
How accurate the estimate is
Not very, but accurate enough. An analysis by Halperin et al. 2022 across 12 studies found that participants underestimated their reserve by just under one rep on average, with wide variation. Estimates were more accurate close to failure and in sets of up to 12 reps. Training experience made little difference.
Example: You stop a set of curls after 10 reps and estimate RIR 2. If you kept going and managed 4 more, your estimate was 2 reps too low. Comparing like this on a safe exercise helps you calibrate. This is an example, not a measured value.
In long sets of 15 reps or more, you probably underestimate your reserve even more.