What prevents the electrons from hitting the nucleus? Shouldn't the proton attract it and destroy the atom?
A very very common question indeed. All the values which are basically calculated , like force on an electron , radius etc. are quantized. Our new quantum model of atom does not say that electron revolve around the nucleus ! Its in fact the probability of finding an electron in the atom. Heisenberg said that we cannot precisely know the trajectory of an electron until we can measure its momentum and position simultaneously. But we cannot know in fact its momentum and position simultaneously. Heisenberg uncertainty equation is given by :
ΔxΔp > h/4π or ΔxΔp = h/4π
(Δx is uncertainty in position and Δp is uncertainty in momentum and h is plank's constant.)
So if Δx is very small , the Δp is very large and vice versa.
Bohr said that electron revolve around nucleus. But Maxwell's law states that any charged particle accelerating should emit energy. According to this , electron should spirally bang into the nucleus. Bohr gave the reason that electron revolve in a constant energy shell and that's why does not emit energy.
Bohr gave the excuse , but could not give the reason for his excuse because already established theory like Maxwell's rule was in fact correct.
Ultimately Wernier Heisenberg and Schrodinger proved him wrong.
From Schrodinger wave equation , we can obtain ψ of which ψ2 basically gives the probability of finding an electron in a unit volume , in an atom. Orbital , a new concept at that time was developed. Orbital was an area where probability of finding an electron was maximum i.e. ψ2 was coming maximum.
Adding onto what sankalpmittal said, under certain circumstances such as those in a process known as electron capture, the electron can be absorbed by the proton. A common example of such an event is during the formation of neutron stars. When a star of less than 1.44 solar masses is no longer able to undergo fusion reactions in it's core, it collapses in on itself. The Pauli exclusion principle states that no two identical fermions (such as electrons) can occupy the same quantum state. As the star is collapsing, the electrons get closer and closer to each other and closer to occupying the same quantum state. By the Pauli exclusion principle, energy in the form of pressure is released in order to prevent this from happening. The pressure will eventually be sufficient enough to prevent further collapse and the star will become a white dwarf. This pressure is known as electron degeneracy pressure.
However, if the star is larger than 1.4 solar masses, then electron degeneracy will not be able to prevent further collapse and the process of electron capture will be initiated. In electron capture, the electron is absorbed by the proton and as a result it converts into a neutron. As a result of multiple electron capturing processes, the majority of protons in the star become neutrons, hence the name "neutron star."
The 1.4 solar mass limit is known as the Chandrasekhar limit.