Possibly bad mouse drivers, but also possibly malware/spyware etc. - I've seen things that will make the mouse wander about the screen by itself and do other weird things to the PC, you might want to scan for those too if you're certain that hardware is not at fault.