It is more than likely a broken speedometer cable. They usually fail at the transmission or transfer case. If you do not have a cable, replace your speed sensor.
It depends on the kind. If it is older, with a needle, then there is something wrong in the mechanism itself. If it's digital, then there's a computer.