I do so think you mean erratic my friend, as I highly doubt your mouse is fostering adult situations....nevermind. Don't wanna know.
Clean the bottom of it.
Change the battery if it's cordless.
Check the USB/bluetooth sensor if it's cordless to see if it's loose.
Make sure the surface you are using it on is flat and non-refractive.
Install the latest drivers
for your mouse from the manufacturers website if the update in device manager doesn't seem to work.