Where does a normal force come from?

It's not exactly electrical or intra/inter-molecular forces as you conjecture in your question. Rather, it's ultimately exchange forces, e.g., https://en.wikipedia.org/wiki/Exchange_interaction. As two macroscopic objects get close (really close) together, the electron shells surrounding their respective atoms begin to affect each other. And two electrons (because they're fermions) can't simultaneously occupy the same state (be in "the same place at the same time", colloquially), better known as the Pauli Exclusion Principle, https://en.wikipedia.org/wiki/Pauli_exclusion_principle (link added after I noticed @Qmechanic edited that Tag into the original question:)

So as you try to push the macroscopic objects together, thus forcing too many electrons into the available atomic shell states, the overall multi-particle state describing that collection of electrons (determined by the Slater determinant, e.g., https://en.wikipedia.org/wiki/Slater_determinant) necessarily gives zero probability for finding any two electrons in the same state. And that gives rise to the macroscopic effect/semblance of a "force", preventing the macroscopic objects from being "in the same place at the same time".

  Edit
$\mathbf{\mbox{--------}}$

Another effect involving exchange forces (unrelated to the op's question about normal forces, per se, but perhaps more generally physically interesting) is the Bose-Einstein condensate, https://en.wikipedia.org/wiki/Bose%E2%80%93Einstein_condensate

Here, a gas of bosons is supercooled so that most of the constituent "particles" all fall into the lowest-energy state. And that's possible because bosons aren't subject to the Pauli exclusion principle, so a large collection of them can all occupy that same state. And then this macroscopic collection exhibits some remarkable quantum properties that you'd expect to only be observable at the microscopic level.

But, now, you couldn't prepare such a remarkable condensate comprised of fermions, like electrons, for exactly the same reason discussed above --- except for https://en.wikipedia.org/wiki/Fermionic_condensate#Fermionic_superfluids where fermions are paired together so that each pair of fermions acts like a boson.

An interesting video discussing all this is at http://learner.org/resources/series213.html Click the [vod] link along the right-hand side of Program 6. Macroscopic Quantum Mechanics The second half of this video interviews Deborah Jin (and some of her grad students), who produced the first-ever fermionic condensate, discussing the physics involved. (Unfortunately, the video's from 2010, and a more recent issue of Physics Today carried Jin's obit, also discussing her accomplishments.)


Essentially the same thing is happening when you place an object on a table as when you hang the object from a spring. Equilibrium is reached when the spring is extended enough for it to provide an upward force on the object equal to the pull of gravity on the object. [There may be oscillations before equilibrium is reached.] The table is also deformed when you place an object on it, though you don't notice the deformation unless you have special measuring equipment (or the table is rickety).

The forces involved in the deformation of both the spring and the table are fundamentally electromagnetic.