A speedometer needs an input signal to work and this generally comes from a speed sensor mounted on the transmission or differential housing but sometimes comes from ABS modules as well.
If the input responsible for speedometer operation is interrupted or not there at all, then your speedometer will not work.  You should then have your vehicle scanned for codes and diagnosed if needed to determine the source of the problem.

TIP: These are not hard fast rules because there are exceptions but here are a few tips to help you determine where to start with your problem.

1) If your speedometer does not work and your odometer does not add mileage then it is possible the problem is not in the cluster itself but in the sensor or circuit instead.

2) If your speedometer is sticking, erratic or inoperative but your odometer still adds mileage then it is possible that the problem is in the cluster itself.