Students have a finite number of attempts for each assessment in their course, and this is where that limit is set. By default, the courses have two fail attempts allowed, so students would have two chances to meet or exceed the passing threshold before a teacher must intervene. This value must be greater than 0, to ensure students don't access assessments without approval, Teacher Review should be enabled.
Keep in mind that when Pretesting is enabled, the pretest attempt will count as one fail/retake attempt.