Muscular failure is the point in a set where, despite full effort, you cannot complete another clean rep. On the RPE scale it corresponds to RPE 10, or 0 reps in reserve (RIR 0). Training to failure means taking sets all the way to that point.
Do you need it to build muscle?
According to current research, no. A meta-analysis by Refalo and colleagues (2023) found no evidence that training to momentary muscular failure produces more muscle growth than stopping just short of it. The authors see signs that beyond a certain proximity to failure, getting even closer adds little.
What does matter is that your sets get close enough to failure. A hard set is a work set that ends with no more than about 3 reps in reserve.
The cost of failure
Failure costs more recovery, especially on heavy compound lifts. On squats or bench press without safeties, a missed rep is also a safety risk. In practice, a split like this has proven itself: heavy compounds at RPE 7 to 9, so 1 to 3 RIR; machines and isolation exercises at RPE 8 to 10, occasionally to failure. This is a practical rule of thumb, not a study result.
Example: You get 12 reps on dumbbell curls and the 13th will not go up. Then you have taken the set to failure. Had you stopped at 10, that would have been 2 RIR. These numbers are an example.
Failure for calibration
Many people underestimate how many reps they have left. An occasional set to failure on a safe exercise shows you how good your RIR estimates are.