Firstly, you build the condition for passing and failing.
Here, you use first AND() formula to say that person whose first score is bigger than 300 and second score is bigger than 500 can get "passed" condition.
Then you use second AND() formula to say others whose third score is qual to 1000 can pass also.
By using OR() formula, you can say that ones who have at least one of two conditions in AND() formula can pass.
IF() formula provides to control the condition and show the results of scores according to the given conditions.