When an electron moves around a proton there are many types of energies acting on it. The most significant of them is the potential energy and the kinetic energy of the electron.
But, there is a constant decrease and increase in these two types of energies.
The electron, approaching the proton, will have kinetic energy and potential energy. When it is far away, it will have a relatively huge amount of potential energy, the same way objects raised high above the ground have huge amounts of potential energy. As it moves towards the proton, the potential energy of the electron decreases.
The kinetic energy at any point is always double the decrease in potential energy.
Kinetic energy keeps an electron hopping, and keeps it from staying in a nucleus and combining with a proton.
So, in simple words, it's the kinetic energy of the electron that keeps it away from the nucleus.