The relationship is given by the constancy of the speed of light. Thus, c acts as a conversion factor between space and time. Note that the ‘speed through time’ I defined above is given as cdτ/dt, which has the ‘proper’ units of velocity. But actually, it’s common to work in units where c = 1 (natural units), so that the question of a conversion never really comes up.
There’s no such thing as ‘absolute rest’, of course. ‘Rest’ is defined with respect to a certain point of view—a reference frame. Everything that’s at rest with respect to you, will ‘move through time’ at the same speed (i. e., c) as you, as shown by the fact that your clocks agree. Everything moving with respect to you will consequently age more slowly.
Now, the weird thing about this is that it’s symmetric: picture two spaceships meeting in the void between the stars. To the passengers of each, their spaceship (provided nothing is being accelerated) will be at rest, and the other’s will move. Consequently, each ship’s crew will maintain that the other ship’s clocks are ticking more slowly! Isn’t that blatantly inconsistent?
Well, it turns out, it’s not: in order to actually compare clocks, at least one ship must turn around, to meet the other. And to do so, it must change reference frames—and then, the symmetry is broken: the crew of the ship that’s turned around will have experienced less time between the two meetings. This is the famous twin ‘paradox’.
However, maybe the answer given by ftg above is actually more appropriate to this question: Maxwell’s equations govern the dynamics of electromagnetic fields; light is an electromagnetic wave; and the only wave-solutions of Maxwell’s equations propagate with a speed of c. In particular, there is no ‘stationary’ oscillating solution—hence, light must always move at the speed of light.
In fact, this was seen early on as a problem of the theory: an observer moving with a certain speed v in the same direction as a beam of light, in a Galilean relativistic universe, ought to see the beam of light moving at c - v; and indeed, moving at c, ought not to see it move at all. But electrodynamics simply doesn’t provide such cases—which was indeed part of what inspired Einstein to formulate his notion of relativity. In a sense, it had been believed that Maxwellian electrodynamics was appropriate only in the rest frame of an observer, but Einstein proposed that we consider it to hold in every rest frame—and special relativity basically falls out of that. (So in a way, the answer from SR and the answer from EM aren’t different at all!)