Tide as a general physical phenomenon is due to the spreading out of a central attractive force a la a gravitational field. Let's take the Earth-Moon system as an example.

The part of the Earth that is closer to the Moon is more strongly attracted to the Moon than the rest of the Earth because it's closer. Similarly, the far side of the Earth is less attracted because it is further away. If we set aside the net force on the Earth by cancelling it out with the centrifugal force*, the unevennesses of the gravitational field and the centrifugal force each contribute to a stretching force: the near side pulls towards the Moon, the far side pushes away.

Since the tidal effect is proportional to the change in the gravitational force, it varies as the gradient of the force (for objects small compared to the orbital radius). This gives it an inverse cube law.

Also, since the tidal effect is proportional to the change in the gravitational force over the entire object, its strength is proportional to the size of the object in question. Thus, lakes do not exhibit large tides, while the oceans do.

Since the stretching effect works simultaneously in opposite directions, when the Moon is full (and thus opposite the Sun), its tide and the Sun's tide are actually in agreement, even though they are opposites! This, and the more obvious case of a new moon, cause the stronger spring tide. When the Moon and Sun are maximally out of alignment (at right angles) the tidal effect is weakest - a neap tide.

Also note that if an object is not perfectly spherical (especially if one axis is longer than the others), it can become tidally locked, meaning the same side always faces the other orbiting body. One such example is the Moon, which is tidally locked to the Earth.

This rule also applies to the electrical force, but only in an insulator. In a conductor, all the charges rush to the nearer side, screwing up the balance of attraction force versus centrifugal force.


* In an orbital frame of reference the centrifugal force exists.