What I did was plant my butt in the school library and do all my homework and studying. Nothing beats having no option but to study. Also my courses where scheduled so I'd have two or three hours breaks between classes. Sometimes up to six. The key being having the breaks to short to want to walk to your car, drive home, drive back and find another space but long enough to complete assignments and get into the groove of studying.
This got me into the habit of doing all work as soon as possible. Even have time to read all the examples, make notes, &c. The end result was I went from missing assignments and barely passing to getting every single thing done and an A in every class every semester. Also with doing everything and studying so much you will find you participate much more in class.
I think studying at home is the worse idea. There are just too many distractions. You can watch TV, listen to music, futz about on the computer, clean, yap on the phone and anything else you can think of to waste time.
Also avoid study groups as they just become another distraction. There will also be a brains of the group that really does and understands everything. You'll get your work done but not understand when it comes to test time. Though for me I usually ended up being the answer guy and everyone else did poorly at test time.
The rare exception to the study group being a detriment is learning a foreign language. As you get practice speaking and listening to the foreign tongue.
When done studying I'd pick up a book and read it in the library. Hiding it somewhere deep in the statistics area of the reference section so I could continue it whenever done studying

.
Oh and don't bring a computer with you to the library and turn off (not silence) your phone in the library.
Edit: Also don't plan your schedule with a friend or carpool. This will end up providing excuses to goof off.