The vast majority of automotive instrument clusters and speedometers produced currently are electronic, meaning they use a speed sensor to determine the vehicles speed instead of a mechanical linkage from the instrument cluster to the transmission as in a mechanical speedometer cluster. This is true in 2003,2004, 2005, 2006 Chevy, Buick, GM, Cadillac, Isuzu, GMC models and many others.
Typically the speed sensor mounts on the transmission and gets its signal from a toothed gear inside the transmission housing. The sensor has an electric current running through it and a magnetic tip that sits very close to the teeth on the gear. When the gear spins, the teeth pass by the magnetic tip of the sensor causing a spike in the electrical signal which the computer registers over time. The more spikes in a given time period the higher speed it displays on your speedometer cluster!
If you have a wiring problem such as rodents chewing on the wires, wires getting rubbed open or broken or in rare instances a sensor failing it will cause your speedometer to stop working and can cause other seemingly unrelated problems to occur as well because the vehicle could be using that sensors signal for lots of other systems such as traction control.