The current is maximum through those segments of a circuit that offer the least resistance. But how do electrons know beforehand that which path will resist their drift the least?
This is really the same as Adam's answer but phrased differently.
Suppose you have a single wire and you connect it to a battery. Electrons start to flow, but as they do so the resistance to their flow (i.e. the resistance of the wire) generates a potential difference. The electron flow rate, i.e. the current, builds up until the potential difference is equal to the battery voltage, and at that point the current becomes constant. All this happens at about the speed of light.
Now take your example of having let's say two wires (A and B) with different resistances connected between the wires - lets say $R_A \gt R_B$. The first few electrons to flow will be randomly distributed between the two wires, A and B, but because wire A has a greater resistance the potential difference along it will build up faster. The electrons feel this potential difference so fewer electrons will flow through A and more electrons will flow through wire B. In turn the potential along wire B will build up and eventually the potential difference along both wires will be equal to the battery. As above this happens extremely rapidly.
So the electrons don't know in advance what path has the least resistance, and indeed the first few electrons to flow will choose random paths. However once the current has stabilised electron flow is restricted by the electron flowing ahead, and these are restricted by the resistance of the paths.
To make an analogy, imagine there are two doors leading out of a theatre, one small door and one big door. The first person to leave after the show will pick a door at random, but as the queues build up more people will pick the larger door because the queue moves faster.
22$\begingroup$ +1 the door analogy is probably one of the best I've heard. $\endgroup$ Aug 7, 2012 at 20:33
2$\begingroup$ "the resistance to their flow (i.e. the resistance of the wire) generates a potential difference" - How? Is it equivalent to the bottle neck effect which you use in your analogy? $\endgroup$– FarcherAug 2, 2016 at 20:52
They don't. Electrons follow the path of least resistance in the same way that water flows downhill. The electrons do not act collectively, each individual electron is driven away from other electrons, and driven toward positive charges. The collective result is well described by the statement that they follow the path of least resistence.
2$\begingroup$ Water flows down both paths. When it reaches the dam, it fills it. As long as the water flowing into the dam is greater than that flowing out of it, the level will rise. No, the water isn't "happier" (I think this is a translation issue). The water goes where the water goes and it goes that way because of the forces acting on it; the same is true of the electricity. $\endgroup$ Aug 7, 2012 at 12:55
3$\begingroup$ @SwapnanilSaha Water doesn't flow down the hill just because the bottom of it is lower, it flows down because the hill is sloped at the position of the water molecules. $\endgroup$ Aug 7, 2012 at 15:30
$\begingroup$ @AdamRedwine: I'm quite confident in my translation and think that you are not giving due respect to nature's emotions. $\endgroup$ Aug 7, 2012 at 15:35
$\begingroup$ @ Darthfett: Sorry, could not understand you. $\endgroup$ Aug 7, 2012 at 15:37
2$\begingroup$ I think this is kind of a bad analogy, unless you imagine the water to be flowing inside pipes. A blockage in a pipe will cause higher pressure further up, and that's why the water doesn't flow into it. $\endgroup$– N. VirgoAug 7, 2012 at 15:47
Electrons go where the electric field pushes or pulls them. That is how they "know" where to go. In a resistance electron drift slows down so the electrons tend to pile up in front of it. This creates a repulsive field and pushes electrons away toward another conducting channel.
A signal does NOT follow the path of least resistance.
That statement implies there are multiple possible paths.
The signal, at each instance of time, 'sees' ONE circuit which can depend upon whether the signal is constant (DC) or alternating (AC).