How does one combine these two¿ I believe that it all comes down to being good at time management. Yo need to be able to prioritize and do the most important tasks first. Divide and conquer. First, you have to be able to tell if on a certain week the tasks during your studies will need more if your time or not. Juggling resposibilities is never easy but if you know beforehand of upcoming event or exam, you can prepare in advance.
What's vital is that you don't jeopardize your studies by handing in important assignments late. You have to keep yourself from being stressed-out, give yourself some "you time" indulge yourself or "treat yourself" as characters from Parks and Recreation used to say. If you miss out ona night out with friends, reschedule it but do not cancel alltogether. To keep yourself motivated you need to set small, achievable goals every week.
It's sn exciting challenge but one that requires you to be extra engaged in everything you do.