How are magnetic fields transmitted? A common analogy for gravity is the ball-on-a-rubber-sheet model. In this model, mass distorts spacetime and creates a 'valley' into which other mass can fall. Is this same principal valid for magnetic fields as well (proton-electron)? If so, then how is the repulsion effect modelled?
I ask because the underlying properties of both forces is very similar (inverse-square law). Thanks.
 A: Two things:
First, it is more intuitive to treat gravitational force as equivalent to electrostatic force, due to the existence of monopoles (and gravitational field lines do not form closed loops). There is a magnetic analogue to gravity, known as gravetomagnetism, frame-dragging, or the Lense-Thirring effect.
Ok, now to answer your question:
Yes, gravitational fields are created by the "valley" mechanism. But, their method of transmission is through gravitational waves.
Imagine, for a moment, that someone instantaneously vaporized the sun. By vaporized, I mean that all the mass was just forced to disappear (note that this is hypothetical). Now, by our classical description, the Earth will change its trajectory immediately (as the net force changed). But the light from the vaporization will take some time to reach the Earth (8 minutes). So we managed to send a signal faster than light!
The flaw in the above situation is that gravity is transmitted by vibrations in the "rubber sheet" known as gravitational waves. Imagine the same situation in rubber-sheet mode. To make it a bit clearer, imagine a very large sheet with a small but massive sun at the center. Removing the sun will create a vibration that travels to the edge of the sheet. Till the vibration reaches the Earth, the Earth will feel that the sheet has not changed in its vicinity. Once the vibration reaches the Earth, it will be jerked onto its new "no force" path (after a brief period of stretching and squeezing).
Now, Electromagnetism is transmitted by electromagnetic waves. There aren't any rubber-sheet analogies for this, due to the repulsive-attractive duality. Basically, an EM wave like light propagates in one direction, and carries a mutually perpendicular set of electric and magnetic fields which oscillate (with the same frequency as the wave itself). A moving charge (for that matter, a stationary one, too) emits these waves, which interact with other charges in a similar way as above. The inverse square law here can be said to arise from the fact that the intensity of an EM wave is inversely proportional to the square of the distance (When the wave arises from a point source).
Note that this emission of EM waves does not violate conservation if energy, as the particle will also absorb EM waves from others.
The actual explanation for all this comes from quantum mechanics. I'll only show how the electrostatic repulsive force works here, as the attractive force is a bit more complicated to explain.
In quantum mechanics, in any region of space, even an empty one, "virtual" particles can be created and shortly destroyed. These particles are "virtual" as they do not behave normally.
Now, lets take two protons near each other (neglecting nuclear forces). Each proton "emits" virtual photons in all directions. Note that photons have momentum in quantum mechanics. Now, the proton would stay at rest if the second proton was not there, as net momentum change is zero (photons are being emitted in all directions. But, the proton is absorbing photons on one side from the other proton. So, these photons "push" the proton away from the other proton. The same thing happens to the other proton, and the net result is that the protons move away from each other.
To explain attractive force, you have to take into account that the photon has a wavefunction, and has no definite position or momentum. Thus, a photon coming from the left proton can actually hit the right proton from the right, creating an attractive force. So we have to balance the probabilities for this, and the equations involve the charges of the two bodies, this giving rise to the "like charges repel, opposites attract"
One more thing about electric and magnetic fields: They are actually the same thing. An observer moving at some speed will disagree as to which part of the field is electric and which part is magnetic (As magnetic forces involve velocities).
A: It's fine to think of both the gravitational and electromagnetic fields as geometric objects.  Once we have physics, interpretation is left up to the individual; however clearly some interpretations are better then others.
There are some analogies between gravity and E&M, but they don't last very long.  Maybe one of the stronger analogies between them is their curvature tensors
$$[\nabla_{a},\nabla_{b}]=\text{curvature tensor with some stuff}$$
in both cases.  At least this is the geometric interpretation of those physical quantities.  If you really wanted to stick to the rubber sheet, you would have to allow for not only dips in the sheet, but humps also.  But like I said, the analogy can be misleading.  For instance, on the ball and sheet, the attraction to the dip is by gravity! the gravity in real life while you are holding the sheet.  But there is no meta-gravity that we know of that is behind the motion of test particles on the space-time manifold.  Rather the shear structure of the manifold gives rise to geodesic motion.   And while we think "oh, a force, an attraction." Those curves on the manifold are simply manifestations of typical motion due to the shape of the manifold.
E&M on the other hand, while you can argue the situation is similar, and the action takes place on some sort of electromagnetic manifold, the motion cannot be analogous.  This is because there is no equivalence principle counterpart in E&M.  Charge matters!  and even deeper,
$$\frac{\text{charge}}{\text{mass}}$$
is key for acceleration. This shows up in the equations of motion on an arbitrary Einsteinian manifold
$$\nabla_{a}u^{b}=\frac{q}{m}F_{a}^{\,\;\;b}.$$
All in all I think whenever you can get good physical insight out of an analogy, do it; but don't take it too far or it falls apart.
I hope this helps.
