The explanation for why an electron does not fall into the nucleus comes from a fundamental concept in quantum mechanics: the Heisenberg uncertainty principle. Put simply, it states that you cannot know the position and momentum of a particle simultaneously. More rigorously stated, the product of the uncertainty of the position of a particle (Δx) and the uncertainty of its momentum (Δp) must be greater than a specified value:
\Delta x \Delta p \geq \frac{\hbar}{2}
Now, as the electron approaches the nucleus, it's uncertainty in position decreases (if the electron is 10nm away from the nucleus, it could be anywhere within a spherical shell of radius 10nm, but if the electron is only 0.1nm away from the nucleus, that area is greatly reduced). According to the Heisenberg uncertainty principle, if you decrease the uncertainty of the electrons position, the uncertainty in its momentum must increase. This increased momentum uncertainty means that the electron will be moving away from the nucleus faster, on average.
Put another way, if we do know that at one instant, that the electron is right on top of the nucleus, we lose all information about where the electron will be at the next instant. It could stay at the nucleus, it could be slightly to the left or to the right, or it could very likely be very far away from the nucleus. Therefore, because of the the uncertainty principle it is impossible for the electron to fall into the nucleus and stay in the nucleus.
In essence, the uncertainty principle causes a sort of quantum repulsion, that keeps electrons from being too tightly localized near the nucleus.
For further discussion of the issue, you can read through some past threads in PF discussing this issue:
https://www.physicsforums.com/showthread.php?t=345518
https://www.physicsforums.com/showthread.php?t=410606