How do you prepare for an upper-level mathematics class?
First you read the assigned portion of the text until you understand every sentence. Keep your pen or pencil handy, because you are going to need it while you are reading. Unlike calculus books, upper-level books will have gaps that the author deliberately leaves for you to fill-in. Write out the missing steps, draw diagrams. This is an extremely important part of the learning process. Much of your personal growth and depth of understanding will come from filling-in these gaps. Don't let the author sneak anything past you! Occasionally there will be mistakes. Find them and correct them. If you get stuck trying to understand something on your first reading, you may want to leave it temporarily. After your first reading go back and work on the difficult parts. It may take two or three attempts before you conquer a sticky point.
After you can follow all the logic in a proof, go back and analyze. This is where the understanding comes. What are the hypotheses? Where were they used in the proof? Are they all necessary? Or can one or more of them be relaxed? What is the conclusion? What do you have to establish to justify the conclusion? Did the author accomplish this? What makes the proof work? Usually there are one or two main ideas on which the proof hinges. Maybe it is a fact from number theory or an application of an inequality. Remember this main idea as the key to the theorem. If you can recall the main idea, constructing a proof of the theorem should be a matter of filling in the details. This is how you learn a proof. You don't learn a proof by memorizing words. To "know" a theorem means you can state its hypotheses, you can state its conclusion, and you can write out its proof. When you come to class you should be able to write out the proofs of the theorems covered in the previous class without using your book or notebook.
Definitions. You cannot follow the logic in a proof unless you have a clear understanding of the definitions of terms used in the proof. Master all definitions. When you come to class you should be able to recite all previously covered definitions.
It may well take two to three hours to do all this! Now you are ready to do your homework exercises.