What are some good math specific study habits? What are/ were some of your good mathematician's study habits that you found really worked for you?  I'm a CS major at a respected school and have a solid GPA...  However, I definitely lack when it comes to getting great grades in relatively higher level maths (300 and 400 level).  I feel that even though I study a lot, I perhaps don't study effectively enough.  I would like to ask for any tips/ tricks as to how you keep yourself focused, motivated etc that could perhaps help me or others.  Thanks in advance.
Here's something I didn't do until grad school, but wish I had started earlier. Depending on my schedule each quarter I find one hour every single morning that I set aside for "basics." 

I find that I absolutely must specify this hour for that and only that if I'm going to psychologically get myself to do this. Otherwise I'll just keep putting it off for later and later in the day until I just don't get around to it. Everything else will seem more important, but I've found this time to be extremely useful.

Here's what I use the time for. Take a textbook on a subject you're learning (presumably the assigned textbook, but certainly others work to get a variety of perspectives). Start going through it. By going through it I mean you have a huge stack of paper (usually from the recycling next to a public printer). You read the book, and after every single sentence make sure you can justify why it is true.

Paragraphs from the book will sometimes transfer to many pages of your own writing. Also, don't let the topics get too fancy. This time is set aside for basics.

What I find odd in math compared to practically everything else is that this type of thing isn't emphasized. Even the top musicians in the world set aside time for scales everyday. It is easy to forget while struggling to play a hard piece of music that the basics are what makes it easy to put together (what am I talking about again?).

Maybe everyday is excessive for an undergrad class, but I think a few times a week will really get your brain in gear to understand the harder topics, and it will certainly help you fill in the details of proofs on quizzes/tests if you've already carefully thought through why the steps of the big theorems are true.
If you have always thought of your role in math as that of a calculator, then this is the point where that view of math fails. No wonder so many students think math skills are irrelevant to life. Unfortunately, or fortunately, depending on if you are at it to learn something or if you want a piece of paper that lets you go to work, you will now need to learn to think abstractly in terms of solving problems. This is a good thing in my opinion; suddenly math will become relevant and related to everything else in life. The thought "I can just grab a calculator for this, so I don't need to learn it, or spend any mental energy on it, suddenly becomes obsolete."