Electrons and protons do experience a fundamental force of repulsion due to their electric charges. According to Coulomb's law, like charges repel each other. Since electrons are negatively charged, and protons are positively charged, one might expect them to repel each other.
However, in an atom, the repulsion between electrons and protons is counteracted by the attractive force of the electromagnetic interaction. This attraction arises from the fact that the negatively charged electrons are attracted to the positively charged protons. This attractive force is mediated by the exchange of photons, which are particles of electromagnetic radiation.
In quantum mechanics, the behavior of particles at the atomic scale is described by wave functions and probability distributions. The wave functions of electrons in an atom are solutions to the Schrödinger equation, which incorporates both the repulsive electrical force and the attractive electromagnetic force.
The wave functions of electrons in atoms form specific energy levels and orbitals, which determine the distribution of electrons around the nucleus. These energy levels and orbitals are quantized, meaning they can only have certain discrete values. The arrangement of electrons in these energy levels and orbitals helps to stabilize the atom and minimize the repulsion between electrons and protons.
Additionally, the Heisenberg uncertainty principle states that there is an inherent uncertainty in the precise position and momentum of a particle. This uncertainty allows electrons to occupy specific regions around the nucleus without collapsing into the positively charged nucleus due to the repulsive force.
In summary, the repulsion between electrons and protons is balanced by the attractive electromagnetic force and the quantized energy levels and orbitals in an atom. These factors enable electrons to occupy stable regions around the nucleus without collapsing into it.