The electrons occupy "orbitals" around the nucleus of an atom. These orbitals can only be in certain discrete values. The probability of an electron occupying a spot in the nucleus is NOT zero, it is an actual finite number, however the electron doesn't "stick" to the nucleus. The electron isn't pulled into the nucleus because that would involve electron capture and turn a proton into an neutron. If it is more favorable for the nucleus to remain like it is (AKA the nucleus is stable) then there is no reason for the electron to be captured and it remains in its orbital. Turning the proton into a neutron would form an unstable nucleus and probably result in beta decay (the opposite of electron capture) right back to where the situation was originally.