Why don't electrons collapse into the nucleus when there is a strong attraction between the negatively-charged electrons and the positively-charged nucleus?
1) A relatively simple explanation comes from electron-electron repulsion. If all of the electrons in an atom were to crowd around the nucleus, you would have a lot of negative charges in a small volume. Thus, electron-electron repulsions play some role in opposing the electron-nucleus attraction.
2) The electron-electron repulsion idea works only in multielectron atoms, however. What about the hydrogen atom where no electron-electron repulsions exist? Why does the electron of a hydrogen atom not just crash into the nucleus. The answer here has to do with quantum mechanics (essentially, the idea that electrons are waves as tamim mentioned), specifically, the Heisenberg uncertainty principle.
Briefly, the Heisenberg uncertainty principle states that one cannot know both the speed and position of a particle simultaneously. If an electron were just to sit right next to the nucleus, the uncertainty in its position would be very small. To compensate, the uncertainty in its speed would have to be very large. This essentially means that the electron would be moving around very quickly and these rapid "motions" would give the electron a higher energy.
Thus, confining an electron to a small volume actually raises its energy. By increasing its average localizing over a larger volume of space, the electron can minimize these effects although its average distance from the nucleus will be larger. So, in essence, there is a sort of quantum confinement "force" that opposes the electromagnetic attraction between the nucleus and electron.