If it is a Pet-mouse, put it to bed with a paracetamol. If it is a Wired mouse with a Ball, it could simply need cleaning. If it is a Cordless mouse, it could need a new battery. If it is a PS2 mouse, it could be a faulty cable. If it is a USB mouse, the USB Port might need attention, or the cable might be faulty.
It might help if we had a bit more detail - like, Type of mouse and make and Model! OS type, might also be helpful.