There's some really good advice here. I agree that it's important to take going to class seriously. It's "free" study time, when you're sitting in lecture.
Also, another person mentioned prereading the chapters etc. before class. I started doing that and it really has helped. Also, to study in spurts and try to never really get behind, versus cramming all the time. You just retain better that way, and it makes test taking and finals a whole lot easier.
As an undergrad I remember it being a sort of bragging right for some people to get A's and "never study". Well, you can listen to that hype if you want. But, most people that get 4.0's in tough math and science classes study a lot, and work really hard. So, put in your time.