Because of electromagnetic forces, all of the electrons in the wire are displaced towards A with a certain velocity causing a positive current towards B.
The electrons have a small drift velocity, not moving much.
Although your light turns on very quickly when you flip the switch, and you find it impossible to flip off the light and get in bed before the room goes dark, the actual drift velocity of electrons through copper wires is very slow. It is the change or "signal" which propagates along wires at essentially the speed of light.
A single electron does not go from A to B. Think of it as each electron pushing the next one, and the signal travels with the velocity of light ,maximum, down the wire.
This drift of electrons heats up the highly resistive filament wire in the bulb and makes it glow.
True.
But I don't understand why they are able to move back and forth. Specially if length of the wire was large, say 3 * 10^8 meters, then would the movement of electrons on one end of the wire be "in sync" with movement of electrons on the other end?
Why not? When the field changes at A and B the change propagates by electrons moving back and forth over an average position. Similar to water waves, the atoms do not move much from their position, the energy is transferred atom by atom. In the case of electric fields and electrons the field is built up at the microscopic scale by the motion in situ of the electrons, in a sinusoidal way.
Very long wires enter the realm of special relativity and the limit of the velocity of light in transferring effects of fields.
You've asked some really good questions here. Before starting, I want to first mention that the traditional picture of particles moving through a wire in electostatics is missing some physics; for instance, it ignores the quantum mechanical nature of electrons. The reason we still teach this model is because it captures the main effects (the phenomenon of current) without dealing with microscopic details, but I wanted to warn you that some of the answers will involve physics that is probably not contained in your readings in electrostatics.
To put things in perspective, we now know Newtonian physics is "wrong" (or perhaps more accurately, incomplete), and doesn't give the right answers if, for instance, an object is very small or moving very fast. But we still teach Newtonian physics because it's "good enough" for describing macroscopic objects like cars and baseballs.
Now, to answer your questions,
When electrons start moving through the wire to the positive terminal, do they
all move at once? Because otherwise, while they are moving, they will still
exert repulsive forces on each other? Does this repulsive force affect their
movement?
The microscopic picture of a metal is (crudely) a collection of negative charges, aka electrons, moving through a lattice of positive ions. Indeed, there will be an attraction between these ions and the electrons, and repulsion between any two electrons. Surprisingly, there is also an attractive force between the electrons. The origin of this attractive force is that the electrons attract positive charges around them, and can in some cases lead to the formation of a bound state called a Cooper pair, which are relevant for explaining the phenomenon of super-conductivity, a phase of metals where the resistance is exactly zero. Note, this requires quantum mechanics to do properly, and is extremely subtle.
Shouldn't some of the electrons stay in the wire itself? If, at some point of the
wire, there is not enough repulsive force present, will they stop at all, or
will they reach the positive terminal?
Again, we need a more refined model, in this case statistical mechanics. Before connecting the terminals, the electrons all have a random distribution of energy which manifests itself as temperature. The presence of an electrostatic field causes a net flow of charge, but at the micro level, electrons are colliding and moving in a variety of directions. Often times you will see electrostatics books speak of drift velocity of the electrons, which is a statistical representation of the net flow. A single electron is probably moving much faster than the drift velocity, even perhaps in the opposite direction of the current flow, due to the random thermal energy and the collisions between particles.
Will the shape effect the movement of current? Does it have any effect on the electric field?
In electrostatics, no, but in reality, yes. In mechanics, one has statics and dynamics. In electromagnetism, one has electrostatics and electrodynamics. If you keep learning about electromagnetism, you will soon encounter another field, the magnetic field, and you will learn that the electric fields and magnetic fields are intertwined in such a way that lead you to reconsider the two fields as components of a single entity (hence, "electromagnetism"). In particular, you will learn that current carrying wires produce magnetic fields (Ampère's Law) and that changing magnetic fields can produce EMFs (Faraday's Law). This is a legitimate concern for building real world circuits, and the quantity associated with this effect is called impedance. Impedance is measured in Ohms, like resistance, and depends on the geometry of the circuit.
Will the length of the wire effect the speed of the flow of charges? If we have an infinite length of wire, will charges flow at all?
You're definitely on to something here. The resistance of the wire is proportional to the length of the wire. By Ohm's Law, the current is inversely proportional. The current is proportional to the drift velocity, so the current is inversely proportional to the length of the wire. See http://hyperphysics.phy-astr.gsu.edu/hbase/electric/ohmmic.html#c1 for a derivation.
Best Answer
If the two halves of the wire were made of the same metal and were making a good contact, there would not be any accumulation of charges at the junction.
But, since the metals are different, we have to consider what happens with an electron, when it crosses the junction.
Simplistically, due to the difference of work function values between copper and iron, some work - roughly, equal to the difference between the two work functions - has to be performed in order to move an electron from copper to iron.
Assuming the work function of copper is $4.7eV$ and the work function of iron is $4.5eV$, the required work would be on the order of $0.2eV$.
To perform this work, some electric field has to be applied across the junction and, therefore some accumulation of opposite charges is required to maintain that field.