Could be a lot of things causing this. I'm assuming it works some of the time?
Some possibilities:
1. You have an interrupt conflict.
Fix: Right-click on the My Computer icon, and select Properties.
Click the Device Manager tab.
Scroll down to the Mouse section and double-click it.
See if there's anything but a green checkmark next to the mouse name . If there is, click Properties, and select the Resources tab. If it says there are conflicts, you may be able to resolve them by unchecking "use automatic settings" and then dropping down the box to choose other values. NOTE: this *could* make your mouse stop functioning, period, and you'd have to boot up and navigate here using the keyboard to recheck "use automatic settings". ON the other hand, it could fix the problem.
If you can't select other settings for the mouse, see what is conflicting with the mouse, and try adjusting that (it's probably the modem)
If there is more than one mouse listed, delete them BOTH and let Windows detect/reinstall the mouse again when you restart. Make sure you have the mouse driver disk handy, if possible. You may have to go to Add/Remove Hardware in Control Panel after trying this one.
2. You need to update your mouse driver to a new version.
Fix: go to the manufacturer's website and see if one is available
3. The mouse has a bad cable and is intermittently not making connection.
Fix: buy a new mouse!
4. The PS/2 or serial port is faulty
Fix: ummmm...well, get a PS/2 to serial port adapter, or vice versa, and try the mouse on that port. (I assume this isn't a USB mouse, since you had Windows 95 on the PC)
The first two are most likely. I'd say there's a 80% chance you have an IRQ conflict of some sort.
Good luck.