If it does the same thing with an external mouse, its likely the problem is software related. To double-check, start your computer up and keep tapping F8 straightaway. This will then give you Windows Advanced Options. You can then select Safe mode followed by Windows XP. Once it has loaded into safe mode the cursor should be ok.
If it is ok or not ok, then try going to Start >> All Programs >> Accessories >> System Tools >> System restore, and going back to an earlier date when you think it was fine.
If the cursor is still moving failing the system restore, try the recovery cds that were provided with the machine but do be aware that you lose everything so make sure you back everything up before recovering your machine.
Hope it helps
Kash
April 2006