It might vary between schools/faculties - but this is how it worked last year for physics.
To pass the year, you need 40% average for the year, but you're allowed to have two 'near misses' i.e. 30%+ but above 40 in everything else.
If you don't satisfy this, you resit EVERYTHING you got less than 40% in. If you fail the resit, you might be allowed to repeat the year, but equally you might not.