I can only speak for my own program. We didn't have a separate pharm class; it was integrated into the other courses.
For the first semester, we went in the night before, and looked through the patient's chart (still on paper!) then looked up all of their meds in the computer. Then we had to make cards for each of their meds and research their diagnosis/diagnoses and anything pertaining to their care. We had the Davis Drug Guide, and I'm sure you'll have something similar if you don't already. We could reuse the med cards for the next week if the patient had any of the same meds (same throughout the semester). Making the cards is a good way to learn the meds.
Second semester on (with the exception of the ICU), we found out about our patient(s) the morning of. By then, we knew most of the meds that were common (dilaudid, colace, insulin, etc.), so we could look things up fairly quickly before the AM med pass. Our instructor always asked us what the meds were for. Remember that it's important that you know why YOUR patient is taking this medication, NOT just why it CAN be given (if that makes sense). For example, guanfacine is a blood pressure med, but it's also given for ADHD and Tourette's, so if your patient doesn't have high blood pressure, know their other diagnoses (but still know their AM BP!).
You figure it out quickly, and most computerized med admin systems have a way of looking everything up by clicking on something. Even if you can't necessarily take the time to look it up in your book, you can at least briefly look it up. Also, make sure that your patient's meds don't interact or aren't contraindicated with their diagnoses- a classmate of mine caught an error when her patient had Parkinson's, which was a contraindication of one of their meds, and the MD changed to another med.
Also, know what you need to know when giving that med. What do you need to know before you give a beta blocker? Heparin? A good instructor will ask!