Here is how I used to go about learning when I was a student, before I knew better.
During Math class, which I enjoyed, I paid close attention and whenever I had an inkling of how to do the next step - for example, after the instructor had stated a lemma but before
To study material from lecture, I would quickly skim over my lecture notes to memorize the main definitions and theorems. Then, to work through assignments, I would do many exercises with ease, then stop when I encountered a difficulty and, after giving it a fair try, either manage or fail to solve the problem, call it good and turn in what I had - usually about 80 or 90 percent of the assignment. That meant that, as the assignment usually had problems of increasing difficulty and I stopped before the last problem, my studying reinforced my knowledge of material which I already understood fairly well, but never made me get insights that I had not already acquired in class. I do not recommend that way of studying.
One year I made a friend with whom I worked closely, and, from her, I learned how to study.
To study material from lecture, here is what she did: she would reconstruct the lecture. She had her lecture notes in her notebook next to her, but usually kept it closed. She would try to write down definitions and main theorems from memory, checking by briefly opening her notebook after writing. Moreover, she would also try to reconstruct the arguments by writing down the statements of the lemmas and outlining a proof sketch for each of them! Of course, that was time consuming: even a well-understood two-hour lecture that was fresh in our memory would take at least one hour and often close to two hours to redo. But if there was any subtlety that had gone by unnoticed during class, it really put the spotlight onto it. Then, to do the assignments, she would put in about twice as much work as I used to: indeed, she proudly claimed that she would never turn in an incomplete assignment. Since the last problems were much more difficult than the rest, she would spend the larger part of her time working on those challenging problems. At first that seemed stupid to me: why would one spend so much time reviewing lecture notes, when there was no grade associated to that activity, and we had understood the class fine anyway? Why would one spend more than half of one's study time on a tiny part of the assignment, for a tiny part of the grade? What an inefficient use of one's time! But then, as I watched her work, a realization dawned on me: the assignment was a way for her, not just to practice, but to gain better understanding of the material. She was learning in depth.