Log out of any of the things you think might be a distraction and they'll be less tempting for you. If there's an icon on the screen with notifications or you have a program running in the background while you're studying, you'll be more likely to look at it when you should be studying. Study in short, 25-minute bursts, then take a 5-minute break. During your break, you can look at YouTube or play a quick game if you want.