Like a few others have written, it's all about grouping! When you're a new nursing student taking a pharm class and running into long lists of meds from patients in your clinical, it'll be hard for you to step back and see the trends and grouping that everyone promises you exists.
As you become more experienced (like every "advice forum" will lead off with when a young nurse asks a question...it almost gets frustrating...), you'll start noticing trends and commonly prescribed drugs...Something that might help you when studying for pharm exams, and keep you sane when faced with various lists of patient medications in clinical scenarios would be to start taking note of the suffix's of meds. Ex. --pril, --cillin, --zine, --olol, --nate, --ine, etc.There will always be exceptions to the rule, but as a general rule of thumb (especially when quickly scanning a MAR) these suffix's will give you a clue as to what type of medication family they belong in, which will give you an idea of what safety precautions are required and what side effects they can induce...just always remember that every med is always it's own animal; there will be a couple in each family that have their own particularly unique way to either kill your patient or annoy the **** out of you (based on if you have to include extra time to teach the prescribed pts additional topics regarding diet restrictions, activity restrictions, etc).
Those frequently prescribed meds you'll start to see (atenolol, Lasix, Digoxin, Demerol, Dilaudid, Amoxicillin, etc) will be easy to memorize the s/e, indications, and dangers for, especially if your clinical requires you to write up worksheets for every patient you care for. My personal advice here would be to WRITE these med facts down as you're assigned. Physically writing them out will drill them into your head way faster than just typing them or copy-pasting them over and over as you see them repeated throughout your rotations. You'll start to not even need a reference a manual to quote.
In regards to NCLEX prep, those test writers love to ask about Psych meds (which a lot of the times tend to follow their own rules in regards to trying to group them into similar names), pain meds, and cardiac meds. Not only that, but they like to ask you about the intricacies of a few of the GROUPS, or one unique side effect to know about one specific drug (ex. drinking alcohol while on Flagyl will make you violently ill). Always remember that the NCLEX is mainly testing you on your abilities to be a SAFE nurse, so most of the pharm questions will r/t actions, assessments, and pt education that require safe administration, assessment of potential risks or dangerous side effects, and use.
In the real world of your career in nursing, you'll always have a reference to access whether it be in the form of consulting a physician, pharmacist, or veteran nurse, clinical specialist, a book, or an electronic/internet data base. Don't you fret.