It's most probably caused by a broken tip of the accelerator cable, which is 90% of the time the problem. It could also be a electrical problem, maybe a fuse that's blown.
If it's cable operated it could be a broken cable.
If electronic, I would look at the "Head" (the gauge)
or the sensor on the transmission.
Does the odometer work?