is it wired or wireless? If wireless, the obvious solution is to replace the batteries.
Wired, try another mouse just to verify the UBS slot and computer are fine.
If a different mouse works great, likely new mouse time. You could also try cleaning the bottom of the mouse with windex or something, just to see if it cleans the path... easy trial.