There is some so called "joke" software called Crazy Mouse that produces effects like this. Make sure a friend (hopefully soon to be an ex-friend if it turns out to be true) hasn't nobbled your machine.
Do a Google for Crazy Mouse to find out about it.
Another thing it could be: do you have a graphics pad - Wacom or something similar? If you leave the stylus resting on the pad and try to use the mouse you can produce all sorts of strange effects with the cursor.
go to the pointer options check that pointer speed is centre you can move this down if you wish to slow down the pointer speed make sure only the snap to box is ticked and the hide pointer wile typing is others should be blank