Is it the old fashion Pitot tube speedometer, or a paddle wheel electronic type?
If it is the pitot tube style then the odd are the you clogged the pitot tube. This happens a lot when there is debris floating in the water.
The pitot tube should look something like this:
This would be bolted to the transom of the boat, bow of the bow facing left in this picture. The leg that hangs down would have a small hole in the front side. If it is clogged you will often have luck picking the debris out of it with a needle or similar sharp pointy object. Just don't mess up the opening.
Sometimes the speedometer quits working because you hit something and completely knocked the pitot tube off. They do have a limited "kick up" capability so you may find that it has simply been knocked out of position.