Do you mean when you are in any website, it keeps going back to the previous website?
Is this a laptop or desktop?
There are maybe some more buttons on your mouse (besides two main ones) that you accidentally click that can go backward or forward
Have you tried another mouse?
Can you download and install Firefox browser: http://www.mozilla.com/en-US/firefox/. Then open Firefox and go to any website in firefox and see if it has this issue or not?