The past couple of years, my grades were horrible because I rarely finished (or at least actually started) my homework, nor did I ever study for quizzes and tests. This was due to several things, including a couple unrelated personal issues in my life (depression, anxiety, and OCD), but one of these things was definitely the fact that I put gaming waaay before what I needed to do to succeed in school.
I got my personal issues worked out, though, which in turn helped me realize that it's very important to put school first. I screwed around during my freshman and sophomore years of high school, but now that I'm a junior, I really need to get serious, and I have been. I'm still not perfect of course and I still need to work on making sure I put school first, but 99% of the time now, I turn in my homework and do at least adequate studying.
My grades have improved drastically since the start of this year - from Fs, Ds, and low Cs, to As, Bs, and the occasional high C - and it feels absolutely amazing. I can't even describe.
For anyone struggling in school - particularly those just blowing school off or thinking that your grades are not important - I don't know if this bit of advice will help you, because it didn't help me while I was struggling, but listen to me when I say: Your grades matter. School matters. It all matters. You will be majorly kicking yourself later in life when you have to work at McDonald's eight hours a day for years instead of getting a good career in medical, military, technology, whatever...just because you decided to fool around in school, not get your homework turned in, etc.
A year ago, I understood why that knowledge was important, but I never changed. I don't know whether or not if it was because by then, I was already in such a huge hole with my grades, that I didn't care to try to get them back up, but I do know that my mental/psychological struggles were causing a majority of my problems in school.
It's a new year though, and I got to start off with a clean slate. That, and not having to worry about severe anxiety or anything, I've been doing much, much better, like I said.
So anyways, Gandalf is absolutely right. Put school first. Get your homework done early so you don't have to worry about it and you have the rest of your time to play games or whatever. Study hard, and get good grades on your tests. Yes, it can be difficult at times, especially if you're used to slacking off and not doing a lot of work, but it will be more than worth it in the end. Trust me.