If the cursor moves by itself until it reaches the end of text
Sometimes you might see the cursor of your mouse moving by itself, until it reaches the end of text, if you are on a word processor, or until it reaches the last option, if you are in a dialogue box, etc. My first reaction when I saw this, was to think that some virus took possession of the cursor to make my life difficult, if not to do harm elsewhere. However, this is not a virus case, it is a software problem.
The software that usually comes with a mouse, enabling special features, assigning tasks to mouse buttons, etc, may cause conflicts that make the cursor act like crazy, ignore mouse commands, and constantly move by itself to a place where move is not possible any more.
To fix this, just close the special program that came with your mouse (usually residing at the system tray), and then start it again. If this program does not have a tray icon, try to locate it with the Windows Task Manager.
If you won’t find it even there, the only solution is to restart Windows.