You keep coming back to the internet because it fills a void in your life. So what's the solution?
Find that club, passion, person, job, study, etc, to fill that void in your life. It's going to take some initial motivation, but that's okay. The most important thing is that your priorities change.
Get Cold Turkey. You need to exercise discipline to stop yourself from going on the internet. It is especially so for cases such as going on Facebook during exam week. However, sometimes you just can't stop yourself. Does that mean you're screwed? Don't worry, there is a solution!