If you remotely administer Mac OS X systems, you've probably run into this issue before. Your ARD or Screen Sharing session gets interrupted and when you get back in your cursor keeps jumping back to wherever it was in the last session.
If you have SSH access to the machine, there is a simple way to fix that. The only real caveat is that you're connecting as an administrative user, but since you're using ARD and SSH to get to the machine, that's the most likely case.
Simply connect to the machine via SSH and then run the command:
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent
That will restart the ARDAgent and clear out any previous sessions.