Emac problems

I’m having problems with a used E-mac I bought. I was wondering if anyone else has experienced a similar thing or can suggest how to solve the problem. The apple pro mouse I have plugged in is going crazy. It skips around and is very hard to control. Is there any reason why this happens?