Here are a few things I've found that work really well for me (your mileage may vary):
1.) I try to go through the textbook in the months leading up to classes. Just a superficial scan, getting the basic ideas, maybe work a few of the easier examples and exercises. Once classes start I'll try to keep a few sections ahead of the class. I read the entire section/chapter, do all examples and exercises -- basically teach myself the material as best I can. I've also found that the longer the duration between the time I teach myself and the time we go over it in class, the better it is for me when it comes to long term retention. Usually I'll start on a section about 2-3 weeks before we'll be covering it in class. Once I've covered it I ignore it completely until it is class time (focusing instead on later sections for later classes). When that section is covered in class I'll usually have a very good general understanding, but some of the specifics will already have started getting hazy. The lecture and assigned problem set usually helps me relearn and reinforce the material from the weeks before. I find when I do this I remember things much better than if I self-study only a few days before the class. I'm not sure why, maybe because I'm actually learning it twice (in a sense). One thing I do know, seeing the material for the first time when we cover it in class doesn't work for me unless it is really easy to grasp. I need to have the basics "preloaded" to get anything out of the lecture.
2.) If you have an easier time understanding the material, but a harder time retaining it (as is my case), I've found that being a peer tutor is invaluable. Going over the same material with many different students, and trying to explain it in clearer terms really helps my retention. If you can't peer tutor, just take notes as if you were going to be teaching someone who is having trouble with the material: Try to explain the subject in more detail, but in simpler terms. Write it out as if you would have to teach the class that material.
3.) If you know some programming, try writing some small programs to help you visualize the material. I find this really helps me for physics and math. For example, if you're doing a projectile motion section, create a program where you can change the launch angle, initial velocity, gravity, etc. Then run the program and fiddle with the values to see how the variables effect the outcome. Seeing the simulation play out visually for many different values helps you gain better understanding of the role each value plays.
4.) Don't over study. There are some times that I'm having a lot of trouble with the material, and one thing I've realized is that if I force myself to sit and study it until I "get it" I'm only defeating myself. It's frustrating to walk away from something you don't understand, but I almost always find I understand it better after a few hours, a day, maybe even a week(!), away from it.
5.) Do many, many practice problems. This is essential for me because I'm a SLOW test taker. I like to be very careful when working out problems since I have an easy time missing a minor detail (usually one that causes a major error by the end of the problem), but this usually means I cut it close to the time limit on tests. This itself causes anxiety, which also can slow me down. If I go into a test knowing that I've done tons of problems like the ones likely to be on the test, I have less anxiety and I usually spend less time trying to remember how to set the problem up.
Good luck!
-GeoMike-