The teacher can pass or fail you
You could do all the work or none of it and it is up to them to say "pass" or "fail" by giving you a grade
After a test you could "round" the grades. Like if it was a very hard test and the highest grade was a 60%. You could round everyone's test up by 40%.
If you made a 0%, now you have a 40%. Everyone passes!
(Don't think this is too common, but plausible)
Teachers are "encouraged" to not fail any student by a lot of pressures.
You have to go above any beyond to fail high school. Trying hard and getting bad grades will generally get you enough to pass. Teachers will "work" with you.