These guys are all on the right track...
There are a few things that could cause it... but what kind of bike is it?
Like CBR said... have you changed ANYTHING on the bike? chip, chain, SPROCKET
Second, you should have a speedo pick up on the front sprocket of the bike... you can usually get it out w/o removing too much... check it... make sure there is no damage to it... if you got something jammed up into the front sprocket and cover it could of got chewed up and spit out but not before damaging the speedo sensor.
Then check the connectors for that sensor. Make sure they're clean. Might even want to add some di-electic gel into the connector...but use it sparingly...
Also, does everything else work in your dash? If not check the connection on the back of that!