1) Close the Email program you are currently running.
2) Close the Web browser (all of the screens if you happen to have many).
3) Close the Instant Messenger (or messengers if you happen to run several chat programs).
Do it now.
Now write some code, create some art, compose music or do the tasks what you really should be doing. And no excuses: you can very well use Notepad or something to write blog posts. No, you don’t really need to dig all that info from the web while coding. If people really have important information for you, they can use the phone. (And if that starts to bother, close your cellphone too)
That’s pretty much it.
When you have finished some of your actual work, you can go online again.
If can see this line of text, you are doing something wrong (since you should have closed the web browser already).