The way it works is that the game doesn't let most creatures act every single frame - an "average" creature acts only once every 10 frames. In order to achieve this, there is a delay on every action that a creature takes.
Basically, the hundreds digit and higher represent whole turns that are skipped just filling up the waiting counter until it reaches the point of their "speed". "Speed" is a bit of a misnomer, actually, as it's really more "turn delay".
This is why most creatures have 900 speed - they are delayed 9 turns before they get their 1 turn of action, and have to wait for their delay counter to fill up before taking their next action.
A creature with 975 speed, meanwhile, (which is functionally where most dwarves fall, thanks to low agility) has to wait 9 turns, then rolls a random chance to see if it goes that turn or not - with a 75% chance of having to wait another turn.
Agility acts as a multiplier on speed - if someone had only 400 speed/delay to begin with, and another creature had 900 speed/delay, then regardless of whether it was low or high agility, as long as they had the same amount of agility (and equipment), the 400 speed/delay creature would act twice as fast. A creature with 0 speed/delay has no benefit or penalty from agility at all.
Max agility (5000) last time I checked (many versions ago) would basically halve the speed/delay of a creature, while 1 agility would basically multiply speed by about 1.7 times. These numbers may be different by now, however.
Maybe this was altered in later versions, but when I tested it, weight seems to just add directly to the speed of a creature - a creature with very low speed is more noticably affected by encumberance than high speed creatures.
As of right now, speed/delay affects
everything the same - movement, attacking, performing a job, they all take turns that are based entirely upon their effective speed (after all the other modifiers like agility and weight.) A dwarf's job might take 15 of his/her turns to complete, but if a dwarf is taking turns ten times as fast, then everything he/she does is suddenly 10 times faster, and will be done in just 15 frames, as opposed to 150 frames.
Toady has stated that he intends to make movement take up different amounts of time (or more likely, have different amounts of delay penalties) than actions like standard attacks or possibly special attacks (so that ramming someone or an overhead cleave takes up more time than just stabbing), and potentially, different actions may have their delay tied to different attributes, as well (so that movement and attack speed might potentially be based upon different attributes).
Feck. I liked the speedy minning. I don't like that they'll get advantages in combat.
Is there a way to mod the minning so it'll be faster or would it mean minning every type of rock/ore to take less time to dig through?
Do you mean mining itself, or moving and mining? You can just give your dwarves an innate bonus to mining or a bonus to the speed they learn the skill. Legendary miners can mine in a single turn.