There are some quantum rules that are normally being followed by the different particles of the atom. According to the rules, electrons cannot lose energy that will make them fall directly into protons even if they are attracted to the opposite charge of protons.
They can stay where they depend on their energy level. Instead of falling into the nucleus, they do have the tendency to gain more energy that will allow them to reach a higher energy level which may cause them to change their orbits. There are instances when it may fall into the nucleus, but only when it has already used up all of its energy.
The charge of proton in the nucleus may attract electrons but this doe not happen often. It just attracts electrons which causes the electrons to hover near the nucleus of an atom. If in case a collision does happen, this is called electron capture. The proton and the electron that collided together become neutral.
People used to think that electrons orbit the nucleus similar to how a solar system works but this is hard to say especially since the movement of electrons cannot be fully detected. There are not enough tools and materials that can be used in order to actually see how protons and electrons interact with each other. The movement of these particles are based on theories and studies created by different people.