The speed of a ship determines how many squares (parsecs as the game calls them) the ship can travel in a turn. The calculation is very straightforward:
total speed = 1 + sum of all engines + technological bonus + circumstance bonus + racial bonus.
Notice that each ship has a base speed of 1 - even if you put no engines into the hull, and have no other speed bonuses, the ship can still move at a rate of 1 square/turn.
Sum of all engines is pretty self-explanatory - if you put in two impulse drives (each with a speed value of 2), the speed bonus due to engines will be 4. This stacks in a simple additive manner, so having modules with speed 1, 1, 2 and 3 will result in the total engine speed bonus of 1 + 1 + 2 + 3 = 7. This is added to the base speed of 1 to determine the ship's "inherent" speed (the value listed in the ship description under "speed").
The technological bonus is determined by how many technologies that grant "speed +10" you've researched. Each such technology provides a +1 movement bonus to ALL your ships. As implied, the bonuses stack, so if you research the impulse and the warp drive techs, your ships will be granted a +2 bonus to their movement rate based on tech. I believe this can go up to +3 once hyperwarp is researched.
Circumstance bonuses apply under several conditions. If your ship is within range of a starbase that has speed-modifying modules, the sum of the modifications resulting from the modules will be applied to the speed of the ship while in the sphere of influence of the starbase. The bonuses stack, so if you are in range of two overlapping starbases, their bonuses will be cumulative. Additionally, circumstance bonuses can arise from buildings. Owning the Gravity Accelerators project will add +1 to the speed of all your ships. The Hyperion Shipyard project will also add a bonus to the speed of all ships built on the planet with the shipyard (not sure about the exact value of the bonus, but I believe it's either +1 or +2).
Finally, the racial bonus is determined by your selections during customization. The default for this value is 0, and you can spend attribute points to raise it to either +1 or +2 during the customization process (notice that these picks are expensive, and while they provide a substantial advantage early on, their value diminishes as the game and tech progress).
The total speed is the sum of all the bonuses listed above. Having high speed values is crucial because it let's your constructors and transports cover more ground (thus making them more likely to run away from danger or get to their deisgnated project area quicker), and more importantly because it allows your battleships to initiate combat more easily, thus gaining the benefits of first strike.