Why doesn't mathematics collapse even though humans quite often make mistakes in their proofs? To begin with, I am aware of these questions, which seems to be related:
How do I fix someone's published error?, Examples of common false beliefs in mathematics, When have we lost a body of mathematics because errors were found?, etc...
My background: I am a senior undergraduate student in mathematics. Recently, I got a nice chance in a REU program, and started to read some journal articles. My impression was: any result in modern mathematics critically depends on another result, and that result depends on some other result, and ad infinitum.
On the other hand, some graduate students and professors in my university, who stand in quite intimate relations to me, say that, they do not check every details of proofs when they read mathematical monographs and research articles. They simply do not have enough time to read all the details and fill in the lines. (Clearly, I also do not read all the proofs in detail, if it seems to be so difficult or not much relevant to what I am interested in.)
Finally,   I've been heard of some stories on fatal mathematical errors. To be honest, I do not understand what the errors precisely are. What I've been heard about are some "urban legends".
(I intentionally didn't write down the details of these urban legends, since if I write down everything I've heard, maybe someone working in the mentioned field may feel insulted...)
For the above reasons, recently I am afraid of the situation where a field in mathematics collapse down because of a single, fatal, but very subtle error in the foundations of that field. In mathematics, everything seems to be so much intertwined, and it seems that no one actually checks every single detail in every mathematical articles.
But the mathematics community seems to be very sound.
Maybe at least one of the followings are true:


*

*Actually, a typical mathematical result does not depend that much on other results. So whenever if possible, a mathematician can check the details of every results which is of interest to him/her.

*Strictly speaking, rigor is actually not that important. Even if a mathematical result turns out to be false, there is still something true in the statement. Therefore, only minor changes will be needed, and all the results depending on the turned-out-to-be-false result remains sound.
Here are my questions.


*

*Why the whole mathematics remains so sound, even though humans are imperfect and quite often produce errors? Are my explanations above correct?

*If a theorem turns out to be wrong, then mathematicians will try to correct (if possible) all the results depending on that theorem. How hard is this job? Isn't it very tedious and frustrating? I want to hear some personal stories.

*As an undergraduate student, I want to know if anybody who is much wiser, older, or experienced, had the same fear as mine. (Again, I want to hear some personal stories.)

*As an undergraduate student who will get into a graduate school in the near future, I want to get some advice. Should I stop worrying and believe the authors of the books and articles I read? When should I check all the details, and when should I just accept the theorem as given?
Thanks to everyone for reading my question.
 A: *

*Redundancy is one big source of self-healing. A result with three different proofs is rather unlikely to be wrong. Also, people try to apply fresh results; wrong results often lead to contradictions when applied, alerting mathematicians to their wrongness. Same for proofs: Mistakes in proofs are often spotted when someone tries to adapt the proof to other questions.

*This is tricky. These days, using Google Scholar's "cited by" feature and various other backlink aggregators, you can get a list of papers/book that reference a given paper. Thus, if you find an error in the literature, you can track down where the "corruption" has spread. But getting corrections published is very difficult. Ted Hill and Nikolai Mnev are known for having struggled through the whole process of correcting someone else's false claims, but lots of people end up staying silent or (these days) just posting what they know somewhere on a forum like MathOverflow when someone stumbles upon the same problem. Then there are situations where no specific error can be pinpointed, but important material is simply imprecise and unreadable; fields often linger in such a limbo until someone does the thankless job of building the foundations underneath them. Katrin Wehrheim is one example of this.

*This question of mine got 41 votes, so yes, this is a fairly well-acknowledged problem.

*Ask your advisor and others. You definitely want to understand all proofs in undergraduate and lower-level graduate classes; they aren't particularly likely to be wrong, but you'll use the ideas anyway. As for advanced theory you rely upon, it depends.
A: An interesting paper on this topic is Explosive Proofs of Mathematical Truths by
Scott Viteri and Simon DeDeo.  Roughly speaking, they propose that the high probability of any particular sequence of deductive steps from A to B being wrong is compensated for by the large number of distinct paths from A to B.
They support their hypothesis by examining 48 Coq proofs and 4 human proofs.
A: This is a broad question, but you may find it helpful to read The Existential Risk of Math Errors. It suggests a certain robustness of the mathematical edifice, which I actually think extends to the natural sciences as a whole. (Newtonian mechanics is "wrong" in a fundamental sense, but neither the development of relativistic mechanics nor the discovery of quantum mechanics has caused the collapse of classical mechanics.) 
This quote in particular from Gian-Carlo Rota bears on your points 1 and 2:

When the Germans were planning to publish Hilbert’s collected papers
  and to present him with a set on the occasion of one of his later
  birthdays, they realized that they could not publish the papers in
  their original versions because they were full of errors, some of them
  quite serious. Thereupon they hired a young unemployed mathematician,
  Olga Taussky-Todd, to go over Hilbert’s papers and correct all
  mistakes. Olga labored for three years; it turned out that all
  mistakes could be corrected without any major changes in the statement
  of the theorems. There was one exception, a paper Hilbert wrote in his
  old age, which could not be fixed; it was a purported proof of the
  continuum hypothesis, you will find it in a volume of the
  Mathematische Annalen of the early thirties. At last, on Hilbert’s
  birthday, a freshly printed set of Hilbert’s collected papers was
  presented to the Geheimrat. Hilbert leafed through them carefully and
  did not notice anything.

A: If a result is not used much, then its veracity does not matter much for the rest of mathematics. 
Otherwise, there may be several proofs of the result, which makes it much more probable (in a general sense) that the result is true. Importantly, there is usually some explanation or understanding of why the result is true, that is, the ideas behind the result. 
Also, people try and do construct counterexamples to disprove a result, if they do not see why the result should be true. 
A: In addition to the answers that have already been given, I think another reason that mathematics doesn't collapse is that the fundamental content of mathematics is ideas and understanding, not only proofs.  If mathematics were done by computers that mindlessly searched for theorems and proof but sometimes made mistakes in their proofs, then I expect that it would collapse.  But usually when a human mathematician proves a theorem, they do it by achieving some new understanding or idea, and usually that idea is "correct" even if the first proof given involving it is not.
One recent and well-publicized story is that told by the late Vladimir Voevodsky in his note The Origins and Motivations of Univalent Foundations.  Here's a bit of one story that he tells about his own experience:

my paper "Cohomological Theory of Presheaves with Transfers," ... was written... in 1992-93.  [Only] In 1999-2000... did I discover that the proof of a key lemma in my paper contained a mistake and that the lemma, as stated, could not be salvaged.  Fortunately, I was able to prove a weaker and more complicated lemma, which turned out to be sufficient for all applications....
This story got me scared. Starting from 1993, multiple groups of mathematicians studied my paper at seminars and used it in their work and none of them noticed the mistake.... A technical argument by a trusted author, which is hard to check and looks similar to arguments known to be correct, is hardly ever checked in detail.

I don't know any of the details of the mathematics in this story, but the fact that he was able to prove a "weaker and more complicated lemma which turned out to be sufficient for all applications" matches my own experience.  For instance, while working on a recent project I discovered no fewer than nine mistaken theorem statements (not just mistakes in proofs of correct theorems) in published or almost-published literature, including several by well-known experts (and two by myself).  However, in all nine cases it was simple to strengthen the hypothesis or weaken the conclusion in such a way as to make the theorem true, in a way that sufficed for all the applications I know of.
I would argue that this is because the mistaken statements were based on correct ideas, and the mistakes were simply in making those ideas precise.  Or to put it differently, mathematicians get our intuitions from "well-behaved" objects: sometimes that intuition can be wrong for "pathological" objects we didn't know about, but in such cases we simply alter the definitions to exclude the pathological ones from consideration.
On the other hand, people do sometimes get mistaken ideas.  For instance, here's another quote from Voevodsky's article:

In October 1998, Carlos Simpson ... claimed to provide an argument that implied that the main result of the "∞-groupoids" paper, which Kapranov and I had published in 1989, cannot be true. However, Kapranov and I had considered a similar critique ourselves and had convinced each other that it did not apply. I was sure that we were right until the fall of 2013 (!!).
I can see two factors that contributed to this outrageous situation: Simpson claimed to have constructed a counterexample, but he was not able to show where the mistake was in our paper. Because of this, it was not clear whether we made a mistake somewhere in our paper or he made a mistake somewhere in his counterexample. Mathematical research currently relies on a complex system of mutual trust based on reputations. By the time Simpson’s paper appeared, both Kapranov and I had strong reputations. Simpson’s paper created doubts in our result, which led to it being unused by other researchers, but no one came forward and challenged us on it.

In this case I do know something about the mathematics involved, and my own opinion is somewhat different from Voevodsky's.  In the 2000's I was a graduate student working on higher category theory, and my impression was that in the community of higher category theory it was taken for granted that Simpson's counterexample was correct and the Kapranov-Voevodsky paper was wrong, because the claimed KV result contradicted well-known ideas in the field.
The point here is that a community of people developing ideas together is likely to have arrived at correct intuitions, and these intuitions can flag "suspicious" results and lead to increased scrutiny of them.  That is, when looking for mistaken ideas (as opposed to technical slips), it makes sense to give differing amounts of scrutiny to different claims based on whether they accord with the intuitions and expectations of experience.
So what do you do as a student?  In addition to the other good advice that's been given, I think one of your primary goals should be to train your own intuition.  That way you will be better-able to evaluate whether a given result, or something like it, is probably true, before you decide whether to read and check the proof in detail.
Of course, there is also the position that Voevodsky was led to:

And I now do my mathematics with a proof assistant. I have a lot of wishes in terms of getting this proof assistant to work better, but at least I don’t have to go home and worry about having made a mistake in my work.

I have a lot of respect for that position; I do plenty of formalization in proof assistants myself, and am very supportive of it.  But I don't think that mathematics would be in danger of collapse without formalization, and I feel free to also do plenty of mathematics that would be prohibitively time-consuming to formalize in present-day proof assistants.
A: It might feel like the chain of citations goes ad infinitum,
but of course this can't literally be the case.  Indeed as long as
mathematics is (at least primarily) an endeavor by and for humans,
the entire chain of reasoning must be graspable by about the time a mathematician
reaches PhD level.  Much of it will not yet be accessible to an advanced
college student such as the OP, and modern mathematics has gone in
so many directions that no one mathematician can grasp more than
a small sliver of the frontier $-$ which is why modern research mathematics
requires specialization, and a mathematical community large enough to support
such a large frontier.  Inevitably errors occur, and a few of those
propagate for some time before being caught.  But the enterprise as a whole
is self-correcting (as already explained in several ways in other answers).
A: Well, because of a multitude of reasons, including: 


*

*Mathematicians rarely make mistakes in simple proofs. And a lot of the basics of math are simple theorems that follow easily from the formal definitions and axioms.

*Mistakes get corrected before claims gain acceptance:
2.1 Most people double-check and re-check their own proofs before claiming to have proved something significant (although some don't - I've heard a rumor that Saharon Shelah had a bunch of papers with errors and brushed this off by saying they could easily be rectified, so it doesn't matter.)
2.2 Mathematicians are a community and check each other's work - so there's much less chance of mistakes escaping scrutiny.

*Doubt: People - mathematicians and users of math - don't just accept new claims at face value. Even if they don't have the time to check proofs themselves, they'll treat new claims/results as somewhat suspect until sufficient (or apparently sufficient) verification happens.

*Using an erroneous theorem usually leads to obvious problems, so whoever adopts an erroneous theorem as valid typically falls flat on their face, and this easily leads to doubt being cast on their assumptions - namely, the faulty theorem.

*New mistakes don't invalidate past work. If a field of mathematics has some valid, no-mistakes basis, then our mistakes building on that basis don't invalidate it. At most, we may get confused and doubt some of it - but that will only make us double-check its validity or look for a counter-example - which will fail.

A: While the responses to this question have so far have generally (and correctly) focused on the robust nature of the edifice of mathematics as a whole, it might be worth pointing out by way of contrast that sometimes there are indeed doubts about foundational issues within a specific subfield (because, e.g., an "important" paper is known to have flaws), and that can be extremely deleterious to the field in question. Something along these lines is discussed in this Quanta magazine article: https://www.quantamagazine.org/the-fight-to-fix-symplectic-geometry-20170209/. (And I would say that what is described there is not even the most extreme example of what can happen.)
A: Further to M. Shulman’s advice to “develop your intuition”, it’s probably worth adding that this is often done by understanding many examples, special cases whose moving parts are already transparent to you. You get something simpler and more robust. And psychologically at least, “trust” in a result often relies on familiarity with a library of such cases, more than on line-checking a general proof. (I would also guess that many innocuous “errors” only reflect some overshoot in generality when streamlining things for publication, and that is why not everything collapses.) Or, in the polemical words of Arnol’d (2004):

There are two principal ways to formulate mathematical assertions (problems, conjectures, theorems,...): Russian and French. The Russian way is to choose the most simple and specific case (so that nobody could simplify the formulation preserving the main point). The French way is to generalize the statement as far as nobody could generalize it further.

(That’s not to say that “top-down” never wins — e.g. reputedly, only the discovery of Bott periodicity settled a “spirited controversy” on specific homotopy groups (1959, p. 355 and Math review).)
A: Thought provoking question..
Perhaps, the reason why a mistakenly accepted result does not lead to collapse of the edifice of mathematics is because mathematics is supported, not by a chain of reasoning, but by a dense network.
In other words, it has massive redundancy, like a building that continues to stand despite one bad brick.
A: To widen the angle a bit, I would like to point out that there is a certain analogy between mathematics and software. Programs are formal constructs that are composed and processed according to formal rules, like mathematical proofs. In fact, for particularly "clean" types of software, for example proof checkers based on dependent type theory, programs are proofs, according to the propositions-as-types paradigm. And just like ordinary software is organized in say, classes and modules, mathematics is organized in propositions and even whole libraries of propositions ("topology", "group theory") that are "exported", like modules. 
Now, the world has a lot of buggy software. Sometimes this can lead to catastrophe. But catastrophe is remarkably rare. Because, the more heavily the world relies on a piece of software--that is, the greater the "user base"--the more likely will critical bugs be found and fixed. Alternatively, a critical bug might only do harm when the consumer of a module uses that module in an unusual way. (Called "edge case" in software engineering.)
It would not be surprising if a similar effect stabilizes mathematics--the software that runs on our minds.
A: If this is something you want to make a difference in, one avenue of attack would be to look into Lamport's "Structured Proof" idea.  You are young, and you have come of age at a time that hypertext is readily available and widely used as a medium of academic communication.
Your question prompted me to ask this one, which resulted in me finding this reference after having lost it for 20 years. (So, thanks :).  If this is something that you particularly want to dedicate time to, Lamport has laid out a path for you.  You could


*

*Do all your proofs in the structured format that Lamport has laid out.  He references using HTML for this many times, but I don't know if he has done a proof-of-concept.  If not, that could be a contribution you make.

*When you come up to the point that you are able to do so, you can attempt to do your own study of existing literature, and find out whether his initial one-third number is actually valid.  I don't know of anyone that has tried to validate that.  (I don't think you would have much luck at this until you have a field that you know well enough to be able to understand existing proofs well.)
See also this redux by Lamport where he gives the same talk 20 years later or so, and also you can search around in his list of publications for references to "101" to see his various mentions of the structured proof concept as he discusses his other work.
If you start now, and you come up with a good way to do a "progressive disclosure"-type interface to a structured proof, it's possible that you could get good enough at doing proofs this way that it becomes second nature, and may actually be faster (it seems like it will almost definitely be more accurate).  I'm saying "faster" is a possibility because it might allow you to clear the noise in your head about a sub-part of the proof, knowing that you can just come back to that bit of it.  It could make it easier to think about the whole thing.  All the speculative statements in this answer are just that--speculation, I haven't tried any of this myself.
I feel like this is a humanly possible effort, and if this question about the soundness of mathematics is something you are highly interested in (I phrase it that way because it will undoubtedly be a lot of work, and an uphill battle against culture and norms), this is potentially a way you could do something about it.
A: Sometimes these collapses happen. Ole Peters and Murray Gell-Mann have a 2016 paper about a mistake in Expected Utility Theory, which they track down to a mistake in a Bernoulli paper from 1738. 
I'm an outsider looking in, but it sure looks like much of that entire field is in serious trouble. There's a post on this here: https://ergodicityeconomics.com/2018/02/16/the-trouble-with-bernoulli-1738/
