Mistakes in proofs are relatively common, but such a mistake doesn't automatically mean that the proof is entirely wrong. Many times, the mistake is just in the exposition, and can be fixed easily. Other times, the mistake is fixable and the fix is apparent. Perhaps the author forget to treat a relatively trivial edge case. In the first two cases, the student would likely just pass with minor corrections to be submitted soon.
Sometimes, of course, the proof is just wrong. That is the dangerous case, which will cause either major corrections or failure.
A few months after Andrew Wiles presented the proof for Fermat's last theorem, some mistakes were found that subsequently took him over a year to patch over. Imagine being 12 months into trying to put the pieces back together, after all the years of work and announcing your finding publicly.